jeudi 30 novembre 2017

MySQL: Specified key was too long; max key length is 767 bytes

I'm creating a development version of a Laravel 5.4 application, which is working, albeit without a complete database.

When I ran php artisan migrate it generated most of the tables, but some failed, though without errors.

When I then attempted an import via phpMyAdmin, I got an error:

#1071 - Specified key was too long; max key length is 767 bytes

... on a number of tables, which happen to be the ones the migration failed to create (it's worth noting that some of the tables have multiple keys, so the error itself is — to me at least — a bit vague).

The production application uses MySQL 5.7 while the development application uses 5.6, which I understand is the cause.

Anyone know how I get around this, without using Docker?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire