<?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 Version20220127130824 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_contact_message ADD room_id INT DEFAULT NULL, ADD subject VARCHAR(255) DEFAULT NULL, ADD user_type VARCHAR(100) DEFAULT NULL, ADD company VARCHAR(100) DEFAULT NULL');
$this->addSql('ALTER TABLE cal_contact_message ADD CONSTRAINT FK_4144295354177093 FOREIGN KEY (room_id) REFERENCES cal_accommodation_room (id)');
$this->addSql('CREATE INDEX IDX_4144295354177093 ON cal_contact_message (room_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE cal_contact_message DROP FOREIGN KEY FK_4144295354177093');
$this->addSql('DROP INDEX IDX_4144295354177093 ON cal_contact_message');
$this->addSql('ALTER TABLE cal_contact_message DROP room_id, DROP subject, DROP user_type, DROP company');
}
}