<?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 Version20240916072453 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE show_case (id INT AUTO_INCREMENT NOT NULL, hotel_category_id INT DEFAULT NULL, tour_category_id INT DEFAULT NULL, site_id INT DEFAULT NULL, title VARCHAR(255) DEFAULT NULL, sequence INT NOT NULL, INDEX IDX_A4FF4FC7CC88D7CD (hotel_category_id), INDEX IDX_A4FF4FC77210CF21 (tour_category_id), INDEX IDX_A4FF4FC7F6BD1646 (site_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE show_case ADD CONSTRAINT FK_A4FF4FC7CC88D7CD FOREIGN KEY (hotel_category_id) REFERENCES hotel_category (id)');
$this->addSql('ALTER TABLE show_case ADD CONSTRAINT FK_A4FF4FC77210CF21 FOREIGN KEY (tour_category_id) REFERENCES tour_category (id)');
$this->addSql('ALTER TABLE show_case ADD CONSTRAINT FK_A4FF4FC7F6BD1646 FOREIGN KEY (site_id) REFERENCES sites (id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE show_case DROP FOREIGN KEY FK_A4FF4FC7CC88D7CD');
$this->addSql('ALTER TABLE show_case DROP FOREIGN KEY FK_A4FF4FC77210CF21');
$this->addSql('ALTER TABLE show_case DROP FOREIGN KEY FK_A4FF4FC7F6BD1646');
$this->addSql('DROP TABLE show_case');
}
}