<?php

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

return new class extends Migration
{
    public function up(): void
    {
        // Direct SQL statement to modify the enum
        DB::statement("ALTER TABLE intercompany_loans MODIFY COLUMN interest_type ENUM('simple', 'compound', 'fixed') DEFAULT 'simple'");
    }

    public function down(): void
    {
        // Revert back to original enum
        DB::statement("ALTER TABLE intercompany_loans MODIFY COLUMN interest_type ENUM('simple', 'compound') DEFAULT 'simple'");
    }
};
