<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     * source_table 단독 인덱스 추가 - 쿼리 성능 향상
     */
    public function up(): void
    {
        Schema::table('system_field_definitions', function (Blueprint $table) {
            $table->index('source_table', 'idx_source_table');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('system_field_definitions', function (Blueprint $table) {
            $table->dropIndex('idx_source_table');
        });
    }
};
