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