<?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 Version20220321074236 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 voucher DROP FOREIGN KEY FK_1392A5D85095217');
$this->addSql('DROP INDEX IDX_1392A5D85095217 ON voucher');
$this->addSql('ALTER TABLE voucher ADD code_list_name VARCHAR(255) DEFAULT NULL, DROP code_list_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE voucher ADD code_list_id INT DEFAULT NULL, DROP code_list_name');
$this->addSql('ALTER TABLE voucher ADD CONSTRAINT FK_1392A5D85095217 FOREIGN KEY (code_list_id) REFERENCES voucher_code_list (id)');
$this->addSql('CREATE INDEX IDX_1392A5D85095217 ON voucher (code_list_id)');
}
}