<?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 Version20240702065327 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_category_site (id INT AUTO_INCREMENT NOT NULL, site_id INT DEFAULT NULL, hotel_category_id INT DEFAULT NULL, INDEX IDX_66CD3D8EF6BD1646 (site_id), INDEX IDX_66CD3D8ECC88D7CD (hotel_category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE hotel_category_site_translation (id INT AUTO_INCREMENT NOT NULL, hotel_category_site_id INT DEFAULT NULL, locale VARCHAR(255) NOT NULL, name VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, INDEX IDX_22E4304B2D7056F (hotel_category_site_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE hotel_destination_site (id INT AUTO_INCREMENT NOT NULL, site_id INT DEFAULT NULL, hotel_destination_id INT DEFAULT NULL, INDEX IDX_F950D382F6BD1646 (site_id), INDEX IDX_F950D382C437287B (hotel_destination_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE hotel_destination_site_translation (id INT AUTO_INCREMENT NOT NULL, hotel_destination_site_id INT DEFAULT NULL, locale VARCHAR(255) NOT NULL, name VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, page_description LONGTEXT DEFAULT NULL, iframe_youtube LONGTEXT DEFAULT NULL, iframe_vimeo LONGTEXT DEFAULT NULL, destination_description LONGTEXT DEFAULT NULL, INDEX IDX_73D47BDD458ECD0F (hotel_destination_site_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tour_destination_site (id INT AUTO_INCREMENT NOT NULL, site_id INT DEFAULT NULL, tour_destination_id INT DEFAULT NULL, INDEX IDX_89FEC52F6BD1646 (site_id), INDEX IDX_89FEC521800822E (tour_destination_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE tour_destination_site_translation (id INT AUTO_INCREMENT NOT NULL, tour_destination_site_id INT DEFAULT NULL, locale VARCHAR(255) NOT NULL, name VARCHAR(255) DEFAULT NULL, description LONGTEXT DEFAULT NULL, INDEX IDX_9CC3731E9B020DD3 (tour_destination_site_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE hotel_category_site ADD CONSTRAINT FK_66CD3D8EF6BD1646 FOREIGN KEY (site_id) REFERENCES sites (id)');
$this->addSql('ALTER TABLE hotel_category_site ADD CONSTRAINT FK_66CD3D8ECC88D7CD FOREIGN KEY (hotel_category_id) REFERENCES hotel_category (id)');
$this->addSql('ALTER TABLE hotel_category_site_translation ADD CONSTRAINT FK_22E4304B2D7056F FOREIGN KEY (hotel_category_site_id) REFERENCES hotel_category_site (id)');
$this->addSql('ALTER TABLE hotel_destination_site ADD CONSTRAINT FK_F950D382F6BD1646 FOREIGN KEY (site_id) REFERENCES sites (id)');
$this->addSql('ALTER TABLE hotel_destination_site ADD CONSTRAINT FK_F950D382C437287B FOREIGN KEY (hotel_destination_id) REFERENCES hotel_destination (id)');
$this->addSql('ALTER TABLE hotel_destination_site_translation ADD CONSTRAINT FK_73D47BDD458ECD0F FOREIGN KEY (hotel_destination_site_id) REFERENCES hotel_destination_site (id)');
$this->addSql('ALTER TABLE tour_destination_site ADD CONSTRAINT FK_89FEC52F6BD1646 FOREIGN KEY (site_id) REFERENCES sites (id)');
$this->addSql('ALTER TABLE tour_destination_site ADD CONSTRAINT FK_89FEC521800822E FOREIGN KEY (tour_destination_id) REFERENCES tour_destination (id)');
$this->addSql('ALTER TABLE tour_destination_site_translation ADD CONSTRAINT FK_9CC3731E9B020DD3 FOREIGN KEY (tour_destination_site_id) REFERENCES tour_destination_site (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE hotel_category_site DROP FOREIGN KEY FK_66CD3D8EF6BD1646');
$this->addSql('ALTER TABLE hotel_category_site DROP FOREIGN KEY FK_66CD3D8ECC88D7CD');
$this->addSql('ALTER TABLE hotel_category_site_translation DROP FOREIGN KEY FK_22E4304B2D7056F');
$this->addSql('ALTER TABLE hotel_destination_site DROP FOREIGN KEY FK_F950D382F6BD1646');
$this->addSql('ALTER TABLE hotel_destination_site DROP FOREIGN KEY FK_F950D382C437287B');
$this->addSql('ALTER TABLE hotel_destination_site_translation DROP FOREIGN KEY FK_73D47BDD458ECD0F');
$this->addSql('ALTER TABLE tour_destination_site DROP FOREIGN KEY FK_89FEC52F6BD1646');
$this->addSql('ALTER TABLE tour_destination_site DROP FOREIGN KEY FK_89FEC521800822E');
$this->addSql('ALTER TABLE tour_destination_site_translation DROP FOREIGN KEY FK_9CC3731E9B020DD3');
$this->addSql('DROP TABLE hotel_category_site');
$this->addSql('DROP TABLE hotel_category_site_translation');
$this->addSql('DROP TABLE hotel_destination_site');
$this->addSql('DROP TABLE hotel_destination_site_translation');
$this->addSql('DROP TABLE tour_destination_site');
$this->addSql('DROP TABLE tour_destination_site_translation');
}
}