From 900a0487b4bc221e6b5bc2a5abfded599baad5cc Mon Sep 17 00:00:00 2001 From: Allineer Date: Sun, 4 Jan 2015 22:40:16 +0300 Subject: [PATCH] "Specified key was too long" fix. [Illuminate\Database\QueryException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `permissions` add primary key perm issions_grantee_entity_permission_primary(`grantee`, `entity`, `permission`)) --- .../2014_01_14_231343_create_permissions_table.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/core/src/migrations/2014_01_14_231343_create_permissions_table.php b/framework/core/src/migrations/2014_01_14_231343_create_permissions_table.php index 8bdef6ab2..3169a0e1b 100644 --- a/framework/core/src/migrations/2014_01_14_231343_create_permissions_table.php +++ b/framework/core/src/migrations/2014_01_14_231343_create_permissions_table.php @@ -14,9 +14,9 @@ class CreatePermissionsTable extends Migration { { Schema::create('permissions', function($table) { - $table->string('grantee'); - $table->string('entity'); - $table->string('permission'); + $table->string('grantee', 100); + $table->string('entity', 100); + $table->string('permission', 100); $table->primary(['grantee', 'entity', 'permission']); }); }