<?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 Version20250130141322 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 code ADD created_from_reservation_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE code ADD CONSTRAINT FK_771530989499442F FOREIGN KEY (created_from_reservation_id) REFERENCES reservation (id)');
$this->addSql('CREATE INDEX IDX_771530989499442F ON code (created_from_reservation_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE code DROP FOREIGN KEY FK_771530989499442F');
$this->addSql('DROP INDEX IDX_771530989499442F ON code');
$this->addSql('ALTER TABLE code DROP created_from_reservation_id');
}
}