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