<?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 Version20220201121709 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 booking_constraint_saison_period (id INT AUTO_INCREMENT NOT NULL, booking_constraint_saison_id INT NOT NULL, start_date DATETIME NOT NULL, end_date DATETIME NOT NULL, INDEX IDX_7E30A0C23304919D (booking_constraint_saison_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE booking_constraint_saison_period ADD CONSTRAINT FK_7E30A0C23304919D FOREIGN KEY (booking_constraint_saison_id) REFERENCES booking_constraint_saison (id)');
$this->addSql('ALTER TABLE booking_constraint_saison DROP start_date, DROP end_date');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE booking_constraint_saison_period');
$this->addSql('ALTER TABLE booking_constraint_saison ADD start_date DATETIME NOT NULL, ADD end_date DATETIME NOT NULL');
}
}