Skip to content

Support for utf8mb4 #6

@david-a

Description

@david-a

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions