migrations/Version20260616120000.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. final class Version20260616120000 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'A2/A3: add tik_tok_auth.needs_reconnect + refresh_failed_at so a failed refresh is '
  11.             'recorded on a dedicated flag instead of poisoning refresh_expires_at (which must stay '
  12.             'the true 365-day expiry). needs_reconnect is what the proactive refresher excludes, '
  13.             'breaking the death-spiral and the false-positive "expired" count.';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE tik_tok_auth ADD needs_reconnect TINYINT(1) DEFAULT 0 NOT NULL, ADD refresh_failed_at DATETIME DEFAULT NULL');
  18.     }
  19.     public function down(Schema $schema): void
  20.     {
  21.         $this->addSql('ALTER TABLE tik_tok_auth DROP needs_reconnect, DROP refresh_failed_at');
  22.     }
  23. }