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

return new class extends Migration {
    public function up(): void
    {
        // Make payment_transaction_id nullable
        DB::statement('ALTER TABLE `transactions` MODIFY `payment_transaction_id` VARCHAR(100) NULL');
    }

    public function down(): void
    {
        // Revert to NOT NULL
        DB::statement('ALTER TABLE `transactions` MODIFY `payment_transaction_id` VARCHAR(100) NOT NULL');
    }
}; 