Skip to content

Commit

Permalink
Updated foreign key on to use table prefix (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
qschmick authored Jul 10, 2018
1 parent f2a06e0 commit b566729
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ public function up()
$table->index('task_id', 'task_results_task_id_idx');
$table->index('ran_at', 'task_results_ran_at_idx');
$table->foreign('task_id', 'task_id_fk')
->references('id')->on('tasks');
->references('id')
->on(config('totem.table_prefix').'tasks');
});

Schema::table(config('totem.table_prefix').'task_frequencies', function (Blueprint $table) {
$table->index('task_id', 'task_frequencies_task_id_idx');
$table->foreign('task_id', 'task_frequencies_task_id_fk')
->references('id')->on('tasks');
->references('id')
->on(config('totem.table_prefix').'tasks');
});

Schema::table(config('totem.table_prefix').'tasks', function (Blueprint $table) {
Expand Down

0 comments on commit b566729

Please sign in to comment.