<?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 Version20211210140345 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 email_templates ADD language_id INT NOT NULL, DROP language');
$this->addSql('ALTER TABLE email_templates ADD CONSTRAINT FK_6023E2A582F1BAF4 FOREIGN KEY (language_id) REFERENCES languages (id)');
$this->addSql('CREATE INDEX IDX_6023E2A582F1BAF4 ON email_templates (language_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE email_templates DROP FOREIGN KEY FK_6023E2A582F1BAF4');
$this->addSql('DROP INDEX IDX_6023E2A582F1BAF4 ON email_templates');
$this->addSql('ALTER TABLE email_templates ADD language VARCHAR(2) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, DROP language_id');
}
}