| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | final class Version20250514115823_Reset_fixes extends AbstractMigration |
||
| 11 | { |
||
| 12 | public function getDescription(): string |
||
| 13 | { |
||
| 14 | return 'Some Schema modifications to fix issues with the reset command'; |
||
| 15 | } |
||
| 16 | |||
| 17 | public function up(Schema $schema): void |
||
| 18 | { |
||
| 19 | $this->addSql('ALTER TABLE stu_alliance_settings DROP CONSTRAINT FK_39FF05F710A0EA3F'); |
||
| 20 | $this->addSql('ALTER TABLE stu_alliance_settings ADD CONSTRAINT FK_39FF05F710A0EA3F FOREIGN KEY (alliance_id) REFERENCES stu_alliances (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); |
||
| 21 | |||
| 22 | $this->addSql('ALTER TABLE stu_wormhole_restrictions DROP CONSTRAINT FK_76C7B8E0A76ED395'); |
||
| 23 | $this->addSql('ALTER TABLE stu_wormhole_restrictions ADD CONSTRAINT FK_76C7B8E0A76ED395 FOREIGN KEY (user_id) REFERENCES stu_user (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function down(Schema $schema): void |
||
| 27 | { |
||
| 28 | $this->addSql('ALTER TABLE stu_alliance_settings DROP CONSTRAINT fk_39ff05f710a0ea3f'); |
||
| 29 | $this->addSql('ALTER TABLE stu_alliance_settings ADD CONSTRAINT fk_39ff05f710a0ea3f FOREIGN KEY (alliance_id) REFERENCES stu_alliances (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); |
||
| 30 | |||
| 31 | $this->addSql('ALTER TABLE stu_wormhole_restrictions DROP CONSTRAINT fk_76c7b8e0a76ed395'); |
||
| 32 | $this->addSql('ALTER TABLE stu_wormhole_restrictions ADD CONSTRAINT fk_76c7b8e0a76ed395 FOREIGN KEY (user_id) REFERENCES stu_user (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); |
||
| 33 | } |
||
| 35 |