Laravel - error on migrate
PHP 5.6
Mysql 5.5
Laravel 5.4
I had this error while executing:
php artisan migrate
Syntax error or access violation: 1071 Specified key was too long; max key l ength is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
I solved by changing the file config/database.php:
'charset' => 'utf8mb4' by 'charset' => 'utf8'
'collation' => 'utf8mb4_unicode_ci' by 'collation' => 'utf8_unicode_ci'
Drop the created tables by laravel, and execute
php artisan migrate again.