clrghouz/database/migrations/2024_04_21_151040_echomail_...

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']);
});
}
};