migrations/Version20220822143534.php line 1
<?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 Version20220822143534 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 sorted_synthesis ADD text_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE sorted_synthesis ADD CONSTRAINT FK_DA399845698D3548 FOREIGN KEY (text_id) REFERENCES text (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE UNIQUE INDEX UNIQ_DA399845698D3548 ON sorted_synthesis (text_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE sorted_synthesis DROP CONSTRAINT FK_DA399845698D3548');
$this->addSql('DROP INDEX UNIQ_DA399845698D3548');
$this->addSql('ALTER TABLE sorted_synthesis DROP text_id');
}
}