DB Migration Failed for Xampp
kjhatis opened this issue · 2 comments
Will You Share the MySQL file ?
I getting this error during php artisan migrate
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (
L: alter table users
add unique users_name_unique
(name
))
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
There is an .env.example file. This is very specific to your environment and not this project. You need to adjust your sql constraints or the seed file.
You may need to also adjust the migration file to specify the max length of the columns for your instance.