<?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 Version20221107191511 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 mail_template ADD smtp_id INT NOT NULL');
$this->addSql('ALTER TABLE mail_template ADD CONSTRAINT FK_4AB7DECBAEBF3FD FOREIGN KEY (smtp_id) REFERENCES brand_smtp (id)');
$this->addSql('CREATE INDEX IDX_4AB7DECBAEBF3FD ON mail_template (smtp_id)');
$this->addSql('ALTER TABLE sms_template ADD gateway_id INT NOT NULL');
$this->addSql('ALTER TABLE sms_template ADD CONSTRAINT FK_F1963E82577F8E00 FOREIGN KEY (gateway_id) REFERENCES brand_sms_gateway (id)');
$this->addSql('CREATE INDEX IDX_F1963E82577F8E00 ON sms_template (gateway_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE mail_template DROP FOREIGN KEY FK_4AB7DECBAEBF3FD');
$this->addSql('DROP INDEX IDX_4AB7DECBAEBF3FD ON mail_template');
$this->addSql('ALTER TABLE mail_template DROP smtp_id');
$this->addSql('ALTER TABLE sms_template DROP FOREIGN KEY FK_F1963E82577F8E00');
$this->addSql('DROP INDEX IDX_F1963E82577F8E00 ON sms_template');
$this->addSql('ALTER TABLE sms_template DROP gateway_id');
}
}