<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('pakasir_transactions', function (Blueprint $table) {
            // Change character_id from varchar to bigint unsigned to match other payment gateway tables
            $table->unsignedBigInteger('character_id')->nullable()->change();
        });
    }

    public function down(): void
    {
        Schema::table('pakasir_transactions', function (Blueprint $table) {
            // Revert back to varchar
            $table->string('character_id')->nullable()->change();
        });
    }
};
