<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Creator language: store the primary posting language (ISO-639-1) directly on the creator row so it
* is readable on the entity and filterable for sponsor targeting (it previously lived only in
* creator_classification.posting_language). Populated by `app:creator:backfill-language` + the
* classification pipelines. Schema-only here.
*/
final class Version20260630120000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add language column (ISO-639-1) + index to creator';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE creator ADD language VARCHAR(8) DEFAULT NULL');
$this->addSql('CREATE INDEX idx_creator_language ON creator (language)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX idx_creator_language ON creator');
$this->addSql('ALTER TABLE creator DROP language');
}
}