mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add index to notifications_attribs (#10589)
This commit is contained in:
committed by
Tony Murray
parent
120e513f1c
commit
565833a69c
@@ -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']);
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user