clrghouz/database/migrations/2024_04_21_151040_echomail_indexes.php
Deon George 8bf58f3daa
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 36s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m35s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
Added performance indexes for echomails/echoareas
2024-04-21 15:19:38 +10:00

39 lines
826 B
PHP

<?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('echomails', function (Blueprint $table) {
$table->index(['echoarea_id']);
$table->index(['fftn_id']);
});
Schema::table('echoareas', function (Blueprint $table) {
$table->index(['domain_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('echoareas', function (Blueprint $table) {
$table->dropIndex(['domain_id']);
});
Schema::table('echomails', function (Blueprint $table) {
$table->dropIndex(['echoarea_id']);
$table->dropIndex(['fftn_id']);
});
}
};