<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20251119181000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add product_note column to dtb_product';
}
public function up(Schema $schema): void
{
$table = $schema->getTable('dtb_product');
if (!$table->hasColumn('product_note')) {
$this->addSql('ALTER TABLE dtb_product ADD product_note TEXT DEFAULT NULL');
}
}
public function down(Schema $schema): void
{
$table = $schema->getTable('dtb_product');
if ($table->hasColumn('product_note')) {
$this->addSql('ALTER TABLE dtb_product DROP COLUMN product_note');
}
}
}