<?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 Version20211125195202 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_document_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_accommodation_occupancy ADD CONSTRAINT FK_3334F576CC15F4B6 FOREIGN KEY (leaving_document_id) REFERENCES cal_booking_document (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_3334F576CC15F4B6 ON cal_accommodation_occupancy (leaving_document_id)');
$this->addSql('ALTER TABLE cal_sparetime_activity ADD manager_id INT DEFAULT NULL, ADD location VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE cal_sparetime_activity ADD CONSTRAINT FK_BFC6D72B783E3463 FOREIGN KEY (manager_id) REFERENCES cal_user (id)');
$this->addSql('CREATE INDEX IDX_BFC6D72B783E3463 ON cal_sparetime_activity (manager_id)');
$this->addSql('ALTER TABLE cal_sparetime_activity_date ADD location VARCHAR(255) DEFAULT NULL');
}
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_3334F576CC15F4B6');
$this->addSql('DROP INDEX UNIQ_3334F576CC15F4B6 ON cal_accommodation_occupancy');
$this->addSql('ALTER TABLE cal_accommodation_occupancy DROP leaving_document_id');
$this->addSql('ALTER TABLE cal_sparetime_activity DROP FOREIGN KEY FK_BFC6D72B783E3463');
$this->addSql('DROP INDEX IDX_BFC6D72B783E3463 ON cal_sparetime_activity');
$this->addSql('ALTER TABLE cal_sparetime_activity DROP manager_id, DROP location');
$this->addSql('ALTER TABLE cal_sparetime_activity_date DROP location');
}
}