<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260611213000 extends AbstractMigration
{
public function getDescription(): string
{
return 'sessions.sess_data BLOB -> MEDIUMBLOB: serialized manager sessions exceed 64KB and '
. 'MySQL (sql_mode without STRICT_TRANS_TABLES) silently truncates them, so the next read '
. 'fails to decode and the user is signed out. MEDIUMBLOB matches the DDL Symfony\'s '
. 'PdoSessionHandler::createTable() emits for MySQL.';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE sessions CHANGE sess_data sess_data MEDIUMBLOB NOT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE sessions CHANGE sess_data sess_data BLOB NOT NULL');
}
}