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