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 tableusersadd uniqueusers_email_unique(
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
Post a Comment