You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project using MySQL 5.6 set up to use utf8mb4 character set and utf8mb4_unicode_ci collation. Having this set means the migration_versions table fails to be created with the following error:
1071 Specified key was too long; max key length is 767 bytes
The version field length of 255 is hardcoded in Doctrine\DBAL\Migrations\Configuration\Configuration::createMigrationTable(), as is creation of the table itself, so there is no way to override the character set or adjust the field length without overriding this method.
The text was updated successfully, but these errors were encountered:
That's one of the reason why utf8mb4_general_ci is recommended over utf8mb4_unicode_ci.
Nonetheless if you feel like it, I would welcome a PR to configure that.
You would need to enforce that new limitation in the MigrationFinder too thought.
I have a project using MySQL 5.6 set up to use
utf8mb4
character set andutf8mb4_unicode_ci
collation. Having this set means themigration_versions
table fails to be created with the following error:1071 Specified key was too long; max key length is 767 bytes
The
version
field length of 255 is hardcoded inDoctrine\DBAL\Migrations\Configuration\Configuration::createMigrationTable()
, as is creation of the table itself, so there is no way to override the character set or adjust the field length without overriding this method.The text was updated successfully, but these errors were encountered: