Skip to content

Commit

Permalink
add index to notifications_attribs (librenms#10589)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilreichert authored and murrant committed Sep 10, 2019
1 parent 120e513 commit 565833a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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']);
});
}
}
1 change: 1 addition & 0 deletions misc/db_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,7 @@ notifications_attribs:
- { Field: value, Type: varchar(255), 'Null': false, Extra: '', Default: '' }
Indexes:
PRIMARY: { Name: PRIMARY, Columns: [attrib_id], Unique: true, Type: BTREE }
notifications_attribs_notifications_id_user_id_index: { Name: notifications_attribs_notifications_id_user_id_index, Columns: [notifications_id, user_id], Unique: false, Type: BTREE }
ospf_areas:
Columns:
- { Field: id, Type: 'int(10) unsigned', 'Null': false, Extra: auto_increment }
Expand Down

0 comments on commit 565833a

Please sign in to comment.