add index to notifications_attribs (#10589)

This commit is contained in:
Wil Reichert
2019-09-10 06:11:12 -07:00
committed by Tony Murray
parent 120e513f1c
commit 565833a69c
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateNotificationsAttribsIndex extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('notifications_attribs', function (Blueprint $table) {
$table->index(['notifications_id','user_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('notifications_attribs', function (Blueprint $table) {
$table->dropIndex(['notifications_id','user_id']);
});
}
}