<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230206094221 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add is_short_term_rental, date_start_rental and date_end_rental';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE property ADD is_short_term_rental BOOLEAN DEFAULT NULL');
$this->addSql('ALTER TABLE property ADD date_start_rental TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE property ADD date_end_rental TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE property DROP is_short_term_rental');
$this->addSql('ALTER TABLE property DROP date_start_rental');
$this->addSql('ALTER TABLE property DROP date_end_rental');
}
}