mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Add index migration
This commit is contained in:
parent
a2f8aad1d5
commit
e27d1a4424
2 changed files with 34 additions and 1 deletions
|
@ -27,7 +27,8 @@ class AddItemIdAndItemTypeIndexesToNotificationsTable extends Migration
|
|||
public function down()
|
||||
{
|
||||
Schema::table('notifications', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropIndex('notifications_item_id_index');
|
||||
$table->dropIndex('notifications_item_type_index');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('notifications', function (Blueprint $table) {
|
||||
$table->index('action');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('notifications', function (Blueprint $table) {
|
||||
$table->dropIndex('notifications_action_index');
|
||||
});
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue