<?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 Version20220505200910 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('CREATE TABLE deal_internal_tag (deal_id INT NOT NULL, internal_tag_id INT NOT NULL, INDEX IDX_62322F8BF60E2305 (deal_id), INDEX IDX_62322F8B15D422C6 (internal_tag_id), PRIMARY KEY(deal_id, internal_tag_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE deal_internal_tag ADD CONSTRAINT FK_62322F8BF60E2305 FOREIGN KEY (deal_id) REFERENCES deal (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE deal_internal_tag ADD CONSTRAINT FK_62322F8B15D422C6 FOREIGN KEY (internal_tag_id) REFERENCES internal_tag (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE deal_internal_tag');
}
}