<?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('vip_packages', function (Blueprint $table) {
            // The user column name that tracks subscription expiry for this package
            // e.g. 'daily_banker_ends_at', 'vip_master_ends_at', 'ht_draw_ends_at'
            // null means no subscription check needed (free packages)
            $table->string('subscription_field')->nullable()->after('is_locked');
        });
    }

    public function down(): void
    {
        Schema::table('vip_packages', function (Blueprint $table) {
            $table->dropColumn('subscription_field');
        });
    }
};
