Create 2026_09_07_071046_add_deleted_at_profile_idindex_to_notifications_table.php

pull/7091/head
Daniel Supernault 2 weeks ago
parent 85fec3ac82
commit d3746bc8ce
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -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…
Cancel
Save