Skip to content

Commit 717de3e

Browse files
bug #37117 [Messenger/DoctrineBridge] set column length for mysql 5.6 compatibility (Nemo64)
This PR was merged into the 5.1 branch. Discussion ---------- [Messenger/DoctrineBridge] set column length for mysql 5.6 compatibility 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. | Q | A | ------------- | --- | Branch? | 5.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #37116 | License | MIT Commits ------- d121906 set column length for mysql 5.6 compatibility
2 parents a31d761 + d121906 commit 717de3e

File tree

1 file changed

+1
-0
lines changed
  • src/Symfony/Component/Messenger/Bridge/Doctrine/Transport

1 file changed

+1
-0
lines changed

src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/Connection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ private function addTableToSchema(Schema $schema): void
390390
$table->addColumn('headers', self::$useDeprecatedConstants ? Type::TEXT : Types::TEXT)
391391
->setNotnull(true);
392392
$table->addColumn('queue_name', self::$useDeprecatedConstants ? Type::STRING : Types::STRING)
393+
->setLength(190) // mysql 5.6 only supports 191 characters on an indexed column in utf8mb4 mode
393394
->setNotnull(true);
394395
$table->addColumn('created_at', self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE)
395396
->setNotnull(true);

0 commit comments

Comments
 (0)