When you run php artisan:migrate on Windows Machine and instead of Running the Migration, there is this error
Just put the following line in the register() method of app\Providers\AppServiceProvider.php
And then run php artisan migrate
Note this problem is with older versions of MySql so you should rather upgrade your mysql installation rather then doing this hack.
[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
Just put the following line in the register() method of app\Providers\AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
public function register()
{
Schema::defaultStringLength(191);
}
And then run php artisan migrate
Note this problem is with older versions of MySql so you should rather upgrade your mysql installation rather then doing this hack.