<?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 Version20221123112519 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 cleaning_fees INT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_maintenance ADD charged_to_id INT DEFAULT NULL, ADD administrative_comment LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_maintenance ADD CONSTRAINT FK_BE7ADFF25CADBA7 FOREIGN KEY (charged_to_id) REFERENCES cal_user (id)');
$this->addSql('CREATE INDEX IDX_BE7ADFF25CADBA7 ON cal_maintenance (charged_to_id)');
$this->addSql('ALTER TABLE cal_maintenance_assignment ADD internal_comment LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_maintenance_media ADD assignement_id INT DEFAULT NULL, ADD title VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE cal_maintenance_media ADD CONSTRAINT FK_CB9A2B1B698C4682 FOREIGN KEY (assignement_id) REFERENCES cal_maintenance_assignment (id)');
$this->addSql('CREATE INDEX IDX_CB9A2B1B698C4682 ON cal_maintenance_media (assignement_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 cleaning_fees');
$this->addSql('ALTER TABLE cal_maintenance DROP FOREIGN KEY FK_BE7ADFF25CADBA7');
$this->addSql('DROP INDEX IDX_BE7ADFF25CADBA7 ON cal_maintenance');
$this->addSql('ALTER TABLE cal_maintenance DROP charged_to_id, DROP administrative_comment');
$this->addSql('ALTER TABLE cal_maintenance_assignment DROP internal_comment');
$this->addSql('ALTER TABLE cal_maintenance_media DROP FOREIGN KEY FK_CB9A2B1B698C4682');
$this->addSql('DROP INDEX IDX_CB9A2B1B698C4682 ON cal_maintenance_media');
$this->addSql('ALTER TABLE cal_maintenance_media DROP assignement_id, DROP title');
}
}