<?php

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

return new class extends Migration
{
    public function up(): void
    {
        DB::statement("ALTER TABLE loyalty_transactions MODIFY COLUMN type ENUM('earned', 'redeemed', 'earned_reversed', 'redeemed_refund') NOT NULL DEFAULT 'earned'");
    }

    public function down(): void
    {
        DB::statement("ALTER TABLE loyalty_transactions MODIFY COLUMN type ENUM('earned', 'redeemed') NOT NULL DEFAULT 'earned'");
    }
};
