<?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 Version20230724083104 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 establishment_promo (id INT AUTO_INCREMENT NOT NULL, establishment_id INT NOT NULL, promo_id INT NOT NULL, deleted TINYINT(1) NOT NULL, INDEX IDX_3402A68E8565851 (establishment_id), INDEX IDX_3402A68ED0C07AFF (promo_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE establishment_promo ADD CONSTRAINT FK_3402A68E8565851 FOREIGN KEY (establishment_id) REFERENCES establishments (id)');
$this->addSql('ALTER TABLE establishment_promo ADD CONSTRAINT FK_3402A68ED0C07AFF FOREIGN KEY (promo_id) REFERENCES promotions (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE establishment_promo DROP FOREIGN KEY FK_3402A68E8565851');
$this->addSql('ALTER TABLE establishment_promo DROP FOREIGN KEY FK_3402A68ED0C07AFF');
$this->addSql('DROP TABLE establishment_promo');
}
}