laravel - php artisan migrate not working properly -


i new laravel , ran auth file make register , login etc...

i have 3 migrations file inside migrations folder: user table reset_password table , user_profile table: problem when ran: php artisan migrate create user table without 2 other table tried these commands:php artisan migrate:rollback, php artisan migrate:refresh, php artisan config:cache php artisan config cache:clear , ran :php artisan migrate , user table created... idea? thank you

i facing same issue, while running php artisan migrate, command starts migrating table , while migrating users table throwing error like:

[illuminate\database\queryexception]
sqlstate[42000]: syntax error or access violation: 1071 specified key long; max key length 767 bytes (sql: alter table users add unique users_email_unique(email))

so, user table migrated , process stops above error. if issue, have solve , after delete users table , again migrate, every thing fine.

to fix above issue, have edit app/providers/appserviceprovider.php file , add boot method default string length like:

use illuminate\support\facades\schema;  function boot() {     schema::defaultstringlength(191); } 

and again migrate, fine.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -