Execute when the database does not have any tables
php artisan migrate
After execution, there will only be two tables in the database: migrations, users
Execute again
php artisan migrate
There will be no new additions to the database. Solve.
The length of the index exceeds
mysql
的限制,在migrate
before settingor smaller...
This is because 5.4 uses the utf8mb4 character set by default, in MySQL / MariaDB.
https://laravel.com/docs/5.4/migrations#indexes
Just install the sample modifications in the documentation.
In AppServiceProvider.php, boot method, call Schema::defaultStringLength method
By the way, you can also enable the database's innodb_large_prefix configuration