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