<?php

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

return new class extends Migration
{
    public function up(): void
    {
        // duplicate trx থাকলে আগে clean করতে হবে manually
        Schema::table('subscription_requests', function (Blueprint $table) {
            $table->unique('trx_id');
        });
    }

    public function down(): void
    {
        Schema::table('subscription_requests', function (Blueprint $table) {
            $table->dropUnique(['trx_id']);
        });
    }
};