Skip to content

Commit

Permalink
🗃️ Change fields size in entry_relationships_table
Browse files Browse the repository at this point in the history
  • Loading branch information
bbs-smuller committed Sep 20, 2019
1 parent b3318e9 commit 5054f0c
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@ public function up()
Schema::create('entry_relationships', function (Blueprint $table) {
$table->string('locale', 16);
$table->string('country', 16);
$table->string('source_contentful_id')->index();
$table->string('source_contentful_type')->index();
$table->string('related_contentful_id')->index();
$table->string('related_contentful_type')->index();
$table->string('source_contentful_id', 64)->index();
$table->string('source_contentful_type', 64)->index();
$table->string('related_contentful_id', 64)->index();
$table->string('related_contentful_type', 64)->index();
$table->integer('order')->unsigned()->default(0);

$table->index(['locale', 'source_contentful_id'], 'l_sid_idx');
$table->index(['country', 'locale', 'source_contentful_id'], 'c_l_sid_idx');
// @TODO... Specified key was too long
// $table->index(['locale', 'source_contentful_id', 'related_contentful_id', 'related_contentful_type'], 'l_sid_rid_rty_idx');
// @TODO... Specified key was too long
// $table->index(['country', 'locale', 'source_contentful_id', 'related_contentful_id', 'related_contentful_type'], 'c_l_sid_rid_rty_idx');
$table->index(['locale', 'source_contentful_id', 'related_contentful_id', 'related_contentful_type'], 'l_sid_rid_rty_idx');
$table->index(['country', 'locale', 'source_contentful_id', 'related_contentful_id', 'related_contentful_type'], 'c_l_sid_rid_rty_idx');
$table->index(['locale', 'related_contentful_id'], 'l_rid_idx');
$table->index(['country', 'locale', 'related_contentful_id'], 'c_l_rid_idx');
// @TODO... Specified key was too long
// $table->index(['country', 'locale', 'related_contentful_id', 'source_contentful_id', 'source_contentful_type'], 'c_l_rid_sid_sty_idx');
$table->index(['country', 'locale', 'related_contentful_id', 'source_contentful_id', 'source_contentful_type'], 'c_l_rid_sid_sty_idx');
});
}

Expand Down

0 comments on commit 5054f0c

Please sign in to comment.