Skip to content

Commit

Permalink
Use explicit column lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
paranoiq authored and janedbal committed Aug 8, 2024
1 parent f4b1bbb commit 2effc60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MigrationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2effc60

Please sign in to comment.