From 5c17bb533851b72f708157392026cf09aeba0d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Fri, 24 Oct 2025 19:20:18 +0200 Subject: [PATCH] fix: delete entity in down() migration --- migrations/Version20251023000555.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migrations/Version20251023000555.php b/migrations/Version20251023000555.php index ccc6d35..56cef03 100644 --- a/migrations/Version20251023000555.php +++ b/migrations/Version20251023000555.php @@ -33,6 +33,9 @@ final class Version20251023000555 extends AbstractMigration $this->addSql('ALTER TABLE entity DROP CONSTRAINT FK_E2844687CB19E6A'); $this->addSql('DROP INDEX IDX_E2844687CB19E6A'); $this->addSql('DROP INDEX UNIQ_E28446850F7084E918020D97CB19E6A'); + $this->addSql('DELETE FROM domain_entity WHERE entity_uid IN (SELECT id FROM entity WHERE from_accredited_registrar_id IS NOT NULL)'); + $this->addSql('DELETE FROM entity_event WHERE entity_uid IN (SELECT id FROM entity WHERE from_accredited_registrar_id IS NOT NULL)'); + $this->addSql('DELETE FROM entity WHERE from_accredited_registrar_id IS NOT NULL'); $this->addSql('ALTER TABLE entity DROP from_accredited_registrar_id'); $this->addSql('CREATE UNIQUE INDEX uniq_e28446850f7084e918020d9 ON entity (tld_id, handle)'); }