<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260610120000 extends AbstractMigration
{
public function getDescription(): string
{
return 'cache_items table backing the shared (DB-backed) app cache, so scheduler-warmed statistics are visible to every ECS task.';
}
public function up(Schema $schema): void
{
// Schema must match what symfony/cache DoctrineDbalAdapter::createTable() emits for
// MySQL — the adapter reads/writes exactly these columns.
$this->addSql('CREATE TABLE cache_items (item_id VARBINARY(255) NOT NULL PRIMARY KEY, item_data MEDIUMBLOB NOT NULL, item_lifetime INTEGER UNSIGNED, item_time INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE cache_items');
}
}