laravel-5.4

Laravel Migration Error: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

拥有回忆 提交于 2019-11-26 03:05:46
问题 Migration error on Laravel 5.4 with php artisan make:auth [Illuminate\\Database\\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tabl e users add unique users_email_unique ( email )) [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes 回答1: According to the official documentation, you can solve this quite easily. Add following