doctrine / DoctrineORMModule

Doctrine ORM Module for Laminas
https://www.doctrine-project.org/projects/doctrine-orm-module.html
MIT License
437 stars 229 forks source link

"Specified key was too long; max key length is 767 bytes" - for version column #720

Closed ittmann closed 2 years ago

ittmann commented 2 years ago

The default configured version_column_length in module.config.php of 1024 is too long in MySQL/MariaDB with utf8mb4 (which is the default in MySQL 8.0 and MariaDB 10.5 and later)

This gives an error when running migrations:migrate for the first time or migrations:sync-metadata-storage when metadata storage needs to be synchronized

In doctrine/migrations it was reduced to 191. See https://github.com/doctrine/migrations/issues/958 and https://github.com/doctrine/migrations/pull/960/files

driehle commented 2 years ago

Thanks for the report. Please provide a PR, this should be easy to fix.

driehle commented 2 years ago

Closed with 323eccfae756650c7ed8b6996c9c9ff37095ad03