<?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 Version20220918211139 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 report_email DROP FOREIGN KEY FK_CD8E7B0DF60E2305');
$this->addSql('ALTER TABLE report_email DROP FOREIGN KEY FK_CD8E7B0DA832C1C9');
$this->addSql('DROP INDEX IDX_CD8E7B0DF60E2305 ON report_email');
$this->addSql('DROP INDEX IDX_CD8E7B0DA832C1C9 ON report_email');
$this->addSql('ALTER TABLE report_email DROP deal_id, DROP email_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE report_email ADD deal_id INT NOT NULL, ADD email_id INT NOT NULL');
$this->addSql('ALTER TABLE report_email ADD CONSTRAINT FK_CD8E7B0DF60E2305 FOREIGN KEY (deal_id) REFERENCES deal (id)');
$this->addSql('ALTER TABLE report_email ADD CONSTRAINT FK_CD8E7B0DA832C1C9 FOREIGN KEY (email_id) REFERENCES email (id)');
$this->addSql('CREATE INDEX IDX_CD8E7B0DF60E2305 ON report_email (deal_id)');
$this->addSql('CREATE INDEX IDX_CD8E7B0DA832C1C9 ON report_email (email_id)');
}
}