<?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 Version20220408144414 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 additional_rent INT DEFAULT NULL, ADD previous_rent INT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_inventory ADD comment LONGTEXT DEFAULT NULL, ADD comment2 LONGTEXT DEFAULT NULL, ADD comment3 LONGTEXT DEFAULT NULL, ADD representative LONGTEXT DEFAULT NULL, ADD need_big_brother TINYINT(1) DEFAULT NULL');
$this->addSql('ALTER TABLE cal_inventory_item ADD image3_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE cal_inventory_item ADD CONSTRAINT FK_5E61AC254F5B5DD8 FOREIGN KEY (image3_id) REFERENCES cal_room_item_image (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_5E61AC254F5B5DD8 ON cal_inventory_item (image3_id)');
$this->addSql('ALTER TABLE cal_maintenance ADD closed_at DATETIME 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_booking_room DROP additional_rent, DROP previous_rent');
$this->addSql('ALTER TABLE cal_inventory DROP comment, DROP comment2, DROP comment3, DROP representative, DROP need_big_brother');
$this->addSql('ALTER TABLE cal_inventory_item DROP FOREIGN KEY FK_5E61AC254F5B5DD8');
$this->addSql('DROP INDEX UNIQ_5E61AC254F5B5DD8 ON cal_inventory_item');
$this->addSql('ALTER TABLE cal_inventory_item DROP image3_id');
$this->addSql('ALTER TABLE cal_maintenance DROP closed_at');
}
}