<?php
declare(strict_types=1);
namespace ProjectsBundleMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20241126154714 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE projects_bundle__task ADD options JSON NOT NULL');
}
public function postUp(Schema $schema): void
{
parent::postUp($schema);
$conn = $this->connection;
$conn->executeStatement("UPDATE projects_bundle__task SET options = '[]'");
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE projects_bundle__task DROP options');
}
}