<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20251119091146 extends AbstractMigration
{
public function getDescription(): string
{
return 'Using EnabledTrait and preparing table for it';
}
public function up(Schema $schema): void
{
$this->addSql('UPDATE product_shop_mode SET enabled = 1 WHERE enabled IS NULL');
$this->addSql('ALTER TABLE product_shop_mode CHANGE enabled enabled TINYINT(1) DEFAULT 1 NOT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE product_shop_mode CHANGE enabled enabled TINYINT(1) DEFAULT NULL');
}
}