migrations/Version20260610120000.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 Version20260610120000 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'cache_items table backing the shared (DB-backed) app cache, so scheduler-warmed statistics are visible to every ECS task.';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         // Schema must match what symfony/cache DoctrineDbalAdapter::createTable() emits for
  15.         // MySQL — the adapter reads/writes exactly these columns.
  16.         $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');
  17.     }
  18.     public function down(Schema $schema): void
  19.     {
  20.         $this->addSql('DROP TABLE cache_items');
  21.     }
  22. }