<?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 Version20240929225615 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('ALTER TABLE change_reservation ADD option_select_reservation_id INT DEFAULT NULL, ADD extra_reservation_id INT DEFAULT NULL, CHANGE id_reference option_quantity_reservation_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE change_reservation ADD CONSTRAINT FK_5AABF20F4991B8F0 FOREIGN KEY (option_quantity_reservation_id) REFERENCES abstract_option_reservation (id)');
$this->addSql('ALTER TABLE change_reservation ADD CONSTRAINT FK_5AABF20FF29B8997 FOREIGN KEY (option_select_reservation_id) REFERENCES abstract_option_reservation (id)');
$this->addSql('ALTER TABLE change_reservation ADD CONSTRAINT FK_5AABF20F2CCDCF5F FOREIGN KEY (extra_reservation_id) REFERENCES extra_reservation (id)');
$this->addSql('CREATE INDEX IDX_5AABF20F4991B8F0 ON change_reservation (option_quantity_reservation_id)');
$this->addSql('CREATE INDEX IDX_5AABF20FF29B8997 ON change_reservation (option_select_reservation_id)');
$this->addSql('CREATE INDEX IDX_5AABF20F2CCDCF5F ON change_reservation (extra_reservation_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE change_reservation DROP FOREIGN KEY FK_5AABF20F4991B8F0');
$this->addSql('ALTER TABLE change_reservation DROP FOREIGN KEY FK_5AABF20FF29B8997');
$this->addSql('ALTER TABLE change_reservation DROP FOREIGN KEY FK_5AABF20F2CCDCF5F');
$this->addSql('DROP INDEX IDX_5AABF20F4991B8F0 ON change_reservation');
$this->addSql('DROP INDEX IDX_5AABF20FF29B8997 ON change_reservation');
$this->addSql('DROP INDEX IDX_5AABF20F2CCDCF5F ON change_reservation');
$this->addSql('ALTER TABLE change_reservation ADD id_reference INT DEFAULT NULL, DROP option_quantity_reservation_id, DROP option_select_reservation_id, DROP extra_reservation_id');
}
}