<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration {
    public function up(): void
    {
        // Extend enum to include pending_confirmation
        DB::statement("ALTER TABLE loan_repayments MODIFY COLUMN status ENUM('scheduled','paid','overdue','waived','pending_confirmation') NOT NULL DEFAULT 'scheduled'");
    }

    public function down(): void
    {
        DB::statement("ALTER TABLE loan_repayments MODIFY COLUMN status ENUM('scheduled','paid','overdue','waived') NOT NULL DEFAULT 'scheduled'");
    }
};
