- Add color VARCHAR(7) column to sites entity - Migration with IF NOT EXISTS for idempotence - Update reference config - Frontend: site color picker, dark mode, card styling improvements Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
608 B
PHP
27 lines
608 B
PHP
<?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');
|
|
}
|
|
}
|