<?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 Version20240717095313 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 hotel_minute_deals_agency (hotel_minute_deals_id INT NOT NULL, agency_id INT NOT NULL, INDEX IDX_C1D2922394CB2E04 (hotel_minute_deals_id), INDEX IDX_C1D29223CDEADB2A (agency_id), PRIMARY KEY(hotel_minute_deals_id, agency_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE hotel_minute_deals_agency ADD CONSTRAINT FK_C1D2922394CB2E04 FOREIGN KEY (hotel_minute_deals_id) REFERENCES hotel_minute_deals (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE hotel_minute_deals_agency ADD CONSTRAINT FK_C1D29223CDEADB2A FOREIGN KEY (agency_id) REFERENCES agency (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 hotel_minute_deals_agency DROP FOREIGN KEY FK_C1D2922394CB2E04');
$this->addSql('ALTER TABLE hotel_minute_deals_agency DROP FOREIGN KEY FK_C1D29223CDEADB2A');
$this->addSql('DROP TABLE hotel_minute_deals_agency');
}
}