migrations/Version20220223214327.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 Version20220223214327 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 candidature DROP FOREIGN KEY FK_E33BD3B8CCFA12B8');
  19.         $this->addSql('ALTER TABLE candidature ADD CONSTRAINT FK_E33BD3B8CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
  20.         $this->addSql('ALTER TABLE certification DROP FOREIGN KEY FK_6C3C6D75CCFA12B8');
  21.         $this->addSql('ALTER TABLE certification ADD CONSTRAINT FK_6C3C6D75CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
  22.         $this->addSql('ALTER TABLE diplome DROP FOREIGN KEY FK_EB4C4D4ECCFA12B8');
  23.         $this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4ECCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
  24.         $this->addSql('ALTER TABLE experience DROP FOREIGN KEY FK_590C103CCFA12B8');
  25.         $this->addSql('ALTER TABLE experience ADD CONSTRAINT FK_590C103CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
  26.         $this->addSql('ALTER TABLE skill DROP FOREIGN KEY FK_5E3DE477CCFA12B8');
  27.         $this->addSql('ALTER TABLE skill ADD CONSTRAINT FK_5E3DE477CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
  28.     }
  29.     public function down(Schema $schema): void
  30.     {
  31.         // this down() migration is auto-generated, please modify it to your needs
  32.         $this->addSql('ALTER TABLE candidature DROP FOREIGN KEY FK_E33BD3B8CCFA12B8');
  33.         $this->addSql('ALTER TABLE candidature ADD CONSTRAINT FK_E33BD3B8CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
  34.         $this->addSql('ALTER TABLE certification DROP FOREIGN KEY FK_6C3C6D75CCFA12B8');
  35.         $this->addSql('ALTER TABLE certification ADD CONSTRAINT FK_6C3C6D75CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
  36.         $this->addSql('ALTER TABLE diplome DROP FOREIGN KEY FK_EB4C4D4ECCFA12B8');
  37.         $this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4ECCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
  38.         $this->addSql('ALTER TABLE experience DROP FOREIGN KEY FK_590C103CCFA12B8');
  39.         $this->addSql('ALTER TABLE experience ADD CONSTRAINT FK_590C103CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
  40.         $this->addSql('ALTER TABLE skill DROP FOREIGN KEY FK_5E3DE477CCFA12B8');
  41.         $this->addSql('ALTER TABLE skill ADD CONSTRAINT FK_5E3DE477CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
  42.     }
  43. }