Add index for project_id

This commit is contained in:
David Bomba 2024-07-10 14:37:17 +10:00
parent 3da6888ce9
commit 4b0908373c

View File

@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('invoices', function (Blueprint $table){
$table->index(['project_id','deleted_at']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};