mirror of https://github.com/pixelfed/pixelfed
Create 2026_09_07_071046_add_deleted_at_profile_idindex_to_notifications_table.php
parent
85fec3ac82
commit
d3746bc8ce
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::statement('
|
||||
ALTER TABLE `notifications`
|
||||
ADD INDEX `notifications_profile_deleted_id_index`
|
||||
(`profile_id`, `deleted_at`, `id`),
|
||||
ALGORITHM=INPLACE,
|
||||
LOCK=NONE
|
||||
');
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
DB::statement('
|
||||
ALTER TABLE `notifications`
|
||||
DROP INDEX `notifications_profile_deleted_id_index`,
|
||||
ALGORITHM=INPLACE,
|
||||
LOCK=NONE
|
||||
');
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue