migrations/Version20260403070000.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Add composite index on (username, platform) for creator lookup by username
  8.  * during TikTok openId rotation fallback.
  9.  */
  10. final class Version20260403070000 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Add composite index on creator (username, platform) for openId rotation username fallback';
  15.     }
  16.     public function up(Schema $schema): void
  17.     {
  18.         $this->addSql('CREATE INDEX idx_creator_username_platform ON creator (username, platform)');
  19.     }
  20.     public function down(Schema $schema): void
  21.     {
  22.         $this->addSql('DROP INDEX idx_creator_username_platform ON creator');
  23.     }
  24. }