From 69782e8b5b346968bef9107b7f0d342b7041d9ab Mon Sep 17 00:00:00 2001 From: Viggo Date: Thu, 30 Nov 2017 19:34:08 +0800 Subject: [PATCH] Update migration.blade.php solve the problem: 1071 Specified key was too long; max key length is 767 bytes, when the table's charset is utf8; --- src/views/generators/migration.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/generators/migration.blade.php b/src/views/generators/migration.blade.php index 89e8cabd..70109d6e 100644 --- a/src/views/generators/migration.blade.php +++ b/src/views/generators/migration.blade.php @@ -17,7 +17,7 @@ public function up() // Create table for storing roles Schema::create('{{ $rolesTable }}', function (Blueprint $table) { $table->increments('id'); - $table->string('name')->unique(); + $table->string('name',50)->unique(); $table->string('display_name')->nullable(); $table->string('description')->nullable(); $table->timestamps(); @@ -39,7 +39,7 @@ public function up() // Create table for storing permissions Schema::create('{{ $permissionsTable }}', function (Blueprint $table) { $table->increments('id'); - $table->string('name')->unique(); + $table->string('name',50)->unique(); $table->string('display_name')->nullable(); $table->string('description')->nullable(); $table->timestamps();