<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20230328115844 extends AbstractMigration
{
public function getDescription(): string
{
return 'Added two fields: `is_archived` and `archived_at`';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE event_managment.event ADD is_archived BOOLEAN DEFAULT FALSE');
$this->addSql('ALTER TABLE event_managment.event ADD archived_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT
NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE event_managment.event DROP is_archived');
$this->addSql('ALTER TABLE event_managment.event DROP archived_at');
}
}