<?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 Version20260106163135 extends AbstractMigration
{
public function getDescription(): string
{
return 'Added is_hidden field to std_snippets table and set it to true for snippets with names starting with [BD#DISABLED]';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE std_snippets ADD is_hidden TINYINT(1) DEFAULT 0 NOT NULL COMMENT 'Flag that indicates if the snippet is hidden'");
$this->addSql("UPDATE std_snippets SET is_hidden = 1 WHERE name LIKE '[BD#DISABLED]%'");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE std_snippets DROP is_hidden");
}
}