Skip to content

Commit

Permalink
set column length for mysql 5.6 compatibility
Browse files Browse the repository at this point in the history
MySQL 5.6 does not support more than 191 characters when an index is used and when using utf8mb4 as charset.
As a workaround, I define the length of the queue_name field.
  • Loading branch information
Nemo64 committed Jun 5, 2020
1 parent e778ea6 commit 24de619
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -390,6 +390,7 @@ private function addTableToSchema(Schema $schema): void
$table->addColumn('headers', self::$useDeprecatedConstants ? Type::TEXT : Types::TEXT)
->setNotnull(true);
$table->addColumn('queue_name', self::$useDeprecatedConstants ? Type::STRING : Types::STRING)
->setLength(190) // https://github.com/symfony/symfony/issues/37116
->setNotnull(true);
$table->addColumn('created_at', self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE)
->setNotnull(true);
Expand Down

0 comments on commit 24de619

Please sign in to comment.