9
After I created the project with the command composer create-project --prefer-dist laravel/laravel laravel-scout
I have been making the following changes to the archive .env
DB_DATABASE=course
DB_USERNAME=root
DB_PASSWORD=1234
Then I created the database with the same name as course
Then I made the command php Artisan migrate within the project, and generated this error;
PS C:\Users\wladimir\Desktop\php\laravel-scout> php artisan migrate
Migration table created successfully.
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `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
PS C:\Users\wladimir\Desktop\php\laravel-scout>
- Can someone explain to me what the Error means?
- Could someone explain to me how to correct the mistake?
Note: I am Walking Xampp, is an application that installs PHP and Mysql.
Places the code for creating the table or class of the Laravel that creates this table.
– rray
ERROR 1709 (HY000): Index column size Too large. The Maximum column size is 767 bytes
– rray
I wanted to understand the reason for downvote the question and my answer, this is a problem of Migrations and not directly from Mysql, after all who "generates" the structure is the Framework, it was not made manually.
– Guilherme Nascimento