add index to notifications_attribs (#10589)
This commit is contained in:
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']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -1082,6 +1082,7 @@ notifications_attribs:
|
||||||
- { Field: value, Type: varchar(255), 'Null': false, Extra: '', Default: '' }
|
- { Field: value, Type: varchar(255), 'Null': false, Extra: '', Default: '' }
|
||||||
Indexes:
|
Indexes:
|
||||||
PRIMARY: { Name: PRIMARY, Columns: [attrib_id], Unique: true, Type: BTREE }
|
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:
|
ospf_areas:
|
||||||
Columns:
|
Columns:
|
||||||
- { Field: id, Type: 'int(10) unsigned', 'Null': false, Extra: auto_increment }
|
- { Field: id, Type: 'int(10) unsigned', 'Null': false, Extra: auto_increment }
|
||||||
|
|
Loading…
Reference in New Issue