<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('ticket_orders', function (Blueprint $table): void {
            $table->unsignedInteger('play_config_version_no')->default(0)->after('client_trace_id');
            $table->unsignedInteger('odds_version_no')->default(0)->after('play_config_version_no');
            $table->unsignedInteger('risk_cap_version_no')->default(0)->after('odds_version_no');
        });
    }

    public function down(): void
    {
        Schema::table('ticket_orders', function (Blueprint $table): void {
            $table->dropColumn([
                'play_config_version_no',
                'odds_version_no',
                'risk_cap_version_no',
            ]);
        });
    }
};
