key too long fix by reducing key length to 191 bytes

This commit is contained in:
Prashant Singh 2019-01-17 15:35:44 +05:30
parent eb373d7ecb
commit f1cae49dab
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
@ -13,6 +14,7 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
Schema::defaultStringLength(191);
} }
/** /**

View File

@ -50,8 +50,8 @@ return [
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => false, 'strict' => true,
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC', 'engine' => null,
], ],
'pgsql' => [ 'pgsql' => [