From 2effc60dad6628cee475d545bfb41694740d8f3e Mon Sep 17 00:00:00 2001 From: Vlasta Neubauer Date: Wed, 19 Jun 2024 16:21:29 +0200 Subject: [PATCH] Use explicit column lengths --- src/MigrationService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MigrationService.php b/src/MigrationService.php index 2e05e5c..27d3c8c 100644 --- a/src/MigrationService.php +++ b/src/MigrationService.php @@ -179,10 +179,10 @@ public function initializeMigrationTable(): bool $schema = new Schema(); $table = $schema->createTable($migrationTableName); - $table->addColumn('version', 'string'); - $table->addColumn('phase', 'string'); - $table->addColumn('started_at', 'string'); // string to support microseconds - $table->addColumn('finished_at', 'string'); + $table->addColumn('version', 'string', ['length' => 20]); + $table->addColumn('phase', 'string', ['length' => 10]); + $table->addColumn('started_at', 'string', ['length' => 30]); // string to support microseconds + $table->addColumn('finished_at', 'string', ['length' => 30]); $table->setPrimaryKey(['version', 'phase']); foreach ($schema->toSql($this->connection->getDatabasePlatform()) as $sql) {