<?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 Version20211031172812 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 professional_profile ADD curriculum_vitae_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE professional_profile ADD CONSTRAINT FK_E728A824AF29A35 FOREIGN KEY (curriculum_vitae_id) REFERENCES document (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_E728A824AF29A35 ON professional_profile (curriculum_vitae_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE professional_profile DROP FOREIGN KEY FK_E728A824AF29A35');
$this->addSql('DROP INDEX UNIQ_E728A824AF29A35 ON professional_profile');
$this->addSql('ALTER TABLE professional_profile DROP curriculum_vitae_id');
}
}