<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250805030013 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$table = $schema->getTable('dtb_category');
if (!$table->hasColumn('is_searchable')) {
$this->addSql("ALTER TABLE dtb_category ADD is_searchable SMALLINT DEFAULT 0 NOT NULL");
}
}
public function down(Schema $schema): void
{
$table = $schema->getTable('dtb_category');
if ($table->hasColumn('is_searchable')) {
$this->addSql("ALTER TABLE dtb_category DROP COLUMN is_searchable");
}
}
}