<?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 Version20211213180638 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 store_site (store_id INT NOT NULL, site_id INT NOT NULL, INDEX IDX_8BFAA72AB092A811 (store_id), INDEX IDX_8BFAA72AF6BD1646 (site_id), PRIMARY KEY(store_id, site_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE store_site ADD CONSTRAINT FK_8BFAA72AB092A811 FOREIGN KEY (store_id) REFERENCES store (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE store_site ADD CONSTRAINT FK_8BFAA72AF6BD1646 FOREIGN KEY (site_id) REFERENCES site (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 store_site');
}
}