Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for utf8mb4 #6

Open
david-a opened this issue Nov 23, 2018 · 0 comments
Open

Support for utf8mb4 #6

david-a opened this issue Nov 23, 2018 · 0 comments

Comments

@david-a
Copy link

david-a commented Nov 23, 2018

Hi, because of the following line, dbmate up outputs the following error message when applied to a utf8mb4, innodb (version<5.7) database: Error: Error 1071: Specified key was too long; max key length is 767 bytes

dbmate/mysql.go

Line 112 in 7bd6947

version varchar(255) primary key)`)

You should limit the version field to less chars (e.g 100) in order to avoid exceeding the 767 byes primary key limit (when multiplied by 4), or force a latin/utf8 encoding on the schema_migrations table ignoring the default db one. more details here: https://stackoverflow.com/a/1814594/1205281

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant