<?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 Version20220909124828 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 deal ADD attachment_email_id INT DEFAULT NULL, DROP image_email');
$this->addSql('ALTER TABLE deal ADD CONSTRAINT FK_E3FEC116AC217289 FOREIGN KEY (attachment_email_id) REFERENCES attachment (id)');
$this->addSql('CREATE INDEX IDX_E3FEC116AC217289 ON deal (attachment_email_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE deal DROP FOREIGN KEY FK_E3FEC116AC217289');
$this->addSql('DROP INDEX IDX_E3FEC116AC217289 ON deal');
$this->addSql('ALTER TABLE deal ADD image_email VARCHAR(300) DEFAULT NULL, DROP attachment_email_id');
}
}