"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`))
This commit is contained in:
Allineer 2015-01-04 22:40:16 +03:00
parent 276e0ce388
commit d1344492ce

View File

@ -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']);
});
}