<?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 Version20230712084300 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 franchise_locale (franchise_id INT NOT NULL, locale_id INT NOT NULL, INDEX IDX_21A5352F523CAB89 (franchise_id), INDEX IDX_21A5352FE559DFD1 (locale_id), PRIMARY KEY(franchise_id, locale_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE franchise_locale ADD CONSTRAINT FK_21A5352F523CAB89 FOREIGN KEY (franchise_id) REFERENCES franchise (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE franchise_locale ADD CONSTRAINT FK_21A5352FE559DFD1 FOREIGN KEY (locale_id) REFERENCES locale (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE franchise_locale DROP FOREIGN KEY FK_21A5352F523CAB89');
$this->addSql('ALTER TABLE franchise_locale DROP FOREIGN KEY FK_21A5352FE559DFD1');
$this->addSql('DROP TABLE franchise_locale');
}
}