laravel 6 7 8 php artisan migrate error SQLSTATE[42S01] migration error solved

preview_player
Показать описание
php artisan migrate
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table

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_em
ail_unique`(`email`))

Desktop\blog\vendor\laravel\framework\src\Illuminate\Database


problem solved and here is the solution


SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre
ady exists


use Illuminate\Support\Facades\Schema;

public function boot()
{
Schema::defaultStringLength(191);
}
run this command line in your terminal or git-bash if you are in windows
php artisan migrate:fresh
Рекомендации по теме
Комментарии
Автор

Crack, me vi todo stackoverflow hasta que apareció tu video. Saludos desde Argentina!

JuanGonzalez-mrfo
Автор

THANKYOU MR IAM SO HAPPY IN THE HELP YOUR TUTORIAL 👨‍🏫📓

rashelveren
Автор

Thank you sir!! It was really helpfull...

kricypatel
Автор

oye bro soy de venezuela, horas buscando y tu video me ayudo, muchas gracias !!!!

antoivetsilva
Автор

Que maravilla. Funciono.. charaf hamidi

levisunexpo
Автор

bro en donde corro el codigo :OOOO ayuddaaa

imagineblack
Автор

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wscube.customers' doesn't exist (SQL: alter table `customers` add `country` varchar(60) null after `address`)

mmixmethai