migrations/Version20220920131003.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20220920131003 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('ALTER TABLE judgement_project DROP FOREIGN KEY FK_D45164BD9395C3F3');
  19.         $this->addSql('ALTER TABLE judgement_project ADD CONSTRAINT FK_D45164BD9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id) ON DELETE CASCADE');
  20.         $this->addSql('ALTER TABLE password_link DROP FOREIGN KEY FK_A4F99EBA9395C3F3');
  21.         $this->addSql('ALTER TABLE password_link ADD CONSTRAINT FK_A4F99EBA9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id) ON DELETE CASCADE');
  22.     }
  23.     public function down(Schema $schema): void
  24.     {
  25.         // this down() migration is auto-generated, please modify it to your needs
  26.         $this->addSql('ALTER TABLE chambervote DROP FOREIGN KEY FK_DC210F2E9FAF8308');
  27.         $this->addSql('ALTER TABLE chambervote DROP FOREIGN KEY FK_DC210F2E72DCDAFC');
  28.         $this->addSql('ALTER TABLE desiderata_desideratachamber DROP FOREIGN KEY FK_E944A53CCEE5FDB');
  29.         $this->addSql('ALTER TABLE desiderata_desideratachamber DROP FOREIGN KEY FK_E944A53C9FAF8308');
  30.         $this->addSql('ALTER TABLE desideratachamber DROP FOREIGN KEY FK_365B36D1CEE5FDB');
  31.         $this->addSql('ALTER TABLE homecard_group DROP FOREIGN KEY FK_66BC6D5A43FB141E');
  32.         $this->addSql('ALTER TABLE homecard_group DROP FOREIGN KEY FK_66BC6D5AFE54D947');
  33.         $this->addSql('ALTER TABLE judgement_project DROP FOREIGN KEY FK_D45164BD9395C3F3');
  34.         $this->addSql('ALTER TABLE judgement_project ADD CONSTRAINT FK_D45164BD9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id)');
  35.         $this->addSql('ALTER TABLE password_link DROP FOREIGN KEY FK_A4F99EBA9395C3F3');
  36.         $this->addSql('ALTER TABLE password_link ADD CONSTRAINT FK_A4F99EBA9395C3F3 FOREIGN KEY (customer_id) REFERENCES customer (id)');
  37.         $this->addSql('ALTER TABLE vote DROP FOREIGN KEY FK_5A10856499601F51');
  38.         $this->addSql('ALTER TABLE vote DROP FOREIGN KEY FK_5A108564CEE5FDB');
  39.         $this->addSql('ALTER TABLE vote_chambervote DROP FOREIGN KEY FK_6FAC397A72DCDAFC');
  40.         $this->addSql('ALTER TABLE vote_chambervote DROP FOREIGN KEY FK_6FAC397A9F63A297');
  41.     }
  42. }