<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20260309120000 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Add color column to sites table';
    }

    public function up(Schema $schema): void
    {
        $this->addSql("ALTER TABLE sites ADD COLUMN IF NOT EXISTS color VARCHAR(7) NOT NULL DEFAULT ''");
    }

    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE sites DROP COLUMN IF EXISTS color');
    }
}
