<?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 Version20220124100935 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 evaluation ADD ue_ect_id INT DEFAULT NULL, CHANGE ecue_id ecue_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE evaluation ADD CONSTRAINT FK_1323A575EA5D1D28 FOREIGN KEY (ue_ect_id) REFERENCES ue_ect (id)');
$this->addSql('CREATE INDEX IDX_1323A575EA5D1D28 ON evaluation (ue_ect_id)');
$this->addSql('ALTER TABLE ue_ect CHANGE ecue_id ecue_id INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE evaluation DROP FOREIGN KEY FK_1323A575EA5D1D28');
$this->addSql('DROP INDEX IDX_1323A575EA5D1D28 ON evaluation');
$this->addSql('ALTER TABLE evaluation DROP ue_ect_id, CHANGE ecue_id ecue_id INT NOT NULL');
$this->addSql('ALTER TABLE ue_ect CHANGE ecue_id ecue_id INT NOT NULL');
}
}