<?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 Version20221210193838 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 event_configuration DROP FOREIGN KEY FK_81BB157B90BA24EC');
$this->addSql('DROP INDEX UNIQ_81BB157B90BA24EC ON event_configuration');
$this->addSql('ALTER TABLE event_configuration CHANGE event_tour_id event_tours_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE event_configuration ADD CONSTRAINT FK_81BB157B4E5DA952 FOREIGN KEY (event_tours_id) REFERENCES event_tour (id)');
$this->addSql('CREATE INDEX IDX_81BB157B4E5DA952 ON event_configuration (event_tours_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `event_configuration` DROP FOREIGN KEY FK_81BB157B4E5DA952');
$this->addSql('DROP INDEX IDX_81BB157B4E5DA952 ON `event_configuration`');
$this->addSql('ALTER TABLE `event_configuration` CHANGE event_tours_id event_tour_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE `event_configuration` ADD CONSTRAINT FK_81BB157B90BA24EC FOREIGN KEY (event_tour_id) REFERENCES event_tour (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_81BB157B90BA24EC ON `event_configuration` (event_tour_id)');
}
}