<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220223214327 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE candidature DROP FOREIGN KEY FK_E33BD3B8CCFA12B8');
$this->addSql('ALTER TABLE candidature ADD CONSTRAINT FK_E33BD3B8CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE certification DROP FOREIGN KEY FK_6C3C6D75CCFA12B8');
$this->addSql('ALTER TABLE certification ADD CONSTRAINT FK_6C3C6D75CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE diplome DROP FOREIGN KEY FK_EB4C4D4ECCFA12B8');
$this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4ECCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE experience DROP FOREIGN KEY FK_590C103CCFA12B8');
$this->addSql('ALTER TABLE experience ADD CONSTRAINT FK_590C103CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE skill DROP FOREIGN KEY FK_5E3DE477CCFA12B8');
$this->addSql('ALTER TABLE skill ADD CONSTRAINT FK_5E3DE477CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE candidature DROP FOREIGN KEY FK_E33BD3B8CCFA12B8');
$this->addSql('ALTER TABLE candidature ADD CONSTRAINT FK_E33BD3B8CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
$this->addSql('ALTER TABLE certification DROP FOREIGN KEY FK_6C3C6D75CCFA12B8');
$this->addSql('ALTER TABLE certification ADD CONSTRAINT FK_6C3C6D75CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
$this->addSql('ALTER TABLE diplome DROP FOREIGN KEY FK_EB4C4D4ECCFA12B8');
$this->addSql('ALTER TABLE diplome ADD CONSTRAINT FK_EB4C4D4ECCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
$this->addSql('ALTER TABLE experience DROP FOREIGN KEY FK_590C103CCFA12B8');
$this->addSql('ALTER TABLE experience ADD CONSTRAINT FK_590C103CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
$this->addSql('ALTER TABLE skill DROP FOREIGN KEY FK_5E3DE477CCFA12B8');
$this->addSql('ALTER TABLE skill ADD CONSTRAINT FK_5E3DE477CCFA12B8 FOREIGN KEY (profile_id) REFERENCES profile (id)');
}
}