<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add composite index on (username, platform) for creator lookup by username
* during TikTok openId rotation fallback.
*/
final class Version20260403070000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add composite index on creator (username, platform) for openId rotation username fallback';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE INDEX idx_creator_username_platform ON creator (username, platform)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX idx_creator_username_platform ON creator');
}
}