Skip to content

Commit

Permalink
Merge pull request #2080 from MTES-MCT/bugfix/2077-delete-sarthe-sign…
Browse files Browse the repository at this point in the history
…alement

[Reprise des signalement] Suppression des signalements importés de la Sarthe
  • Loading branch information
hmeneuvrier authored Dec 22, 2023
2 parents 08b36ff + 5603f38 commit 4865341
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions migrations/Version20231222132047.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,39 @@ public function up(Schema $schema): void
$this->addSql('DELETE FROM suivi WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM signalement_criticite WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM signalement_critere WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM signalement_situation WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM signalement_usager WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM file WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM job_event WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM intervention WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM tag_signalement WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM desordre_precision_signalement WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM desordre_critere_signalement WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM desordre_categorie_signalement WHERE signalement_id IN (
SELECT id FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported)', $parameters);

$this->addSql('DELETE FROM signalement WHERE territory_id = :territory_id AND is_imported = :is_imported', $parameters);
}

Expand Down

0 comments on commit 4865341

Please sign in to comment.