<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260616120000 extends AbstractMigration
{
public function getDescription(): string
{
return 'A2/A3: add tik_tok_auth.needs_reconnect + refresh_failed_at so a failed refresh is '
. 'recorded on a dedicated flag instead of poisoning refresh_expires_at (which must stay '
. 'the true 365-day expiry). needs_reconnect is what the proactive refresher excludes, '
. 'breaking the death-spiral and the false-positive "expired" count.';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE tik_tok_auth ADD needs_reconnect TINYINT(1) DEFAULT 0 NOT NULL, ADD refresh_failed_at DATETIME DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE tik_tok_auth DROP needs_reconnect, DROP refresh_failed_at');
}
}