Skip to content

Commit

Permalink
Update 2013_07_25_145958_create_translations_table.php (#168)
Browse files Browse the repository at this point in the history
Add length limiters for namespace, group and item.

This fixes an issue where the index will fail creation on a utf8mb4_unicode_ci collation as the max length is 3,072 bytes and the current gives us 3,084 bytes ((255+255+255+6) * 4) from the four columns used in the index.
  • Loading branch information
Balakir authored Mar 9, 2020
1 parent 2168a1f commit 30b0953
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public function up()
Schema::connection(config('translator.connection'))->create('translator_translations', function ($table) {
$table->increments('id');
$table->string('locale', 6);
$table->string('namespace')->default('*');
$table->string('group');
$table->string('item');
$table->string('namespace', 150)->default('*');
$table->string('group', 150);
$table->string('item', 150);
$table->text('text');
$table->boolean('unstable')->default(false);
$table->boolean('locked')->default(false);
Expand Down

0 comments on commit 30b0953

Please sign in to comment.