<?php

use App\Models\Real\Order;
use App\Models\Real\OrderCard;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Schema;
use App\Models\Real\OrderCardPartition;
use Illuminate\Database\Schema\Blueprint;
use App\Domains\Virtual\Services\OrderService;

require_once realpath(dirname(__FILE__) . '/TestCase.php');



Schema::table('real_order_cards', function (Blueprint $table) {
    $table->unique(['sim', 'refunded_at', 'deleted_at']);
});

Schema::table('real_order_renewal_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('real_order_renewal_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('real_order_flows_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('real_order_optional_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('real_order_additional_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});


Schema::table('virtual_order_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('virtual_order_renewal_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('virtual_order_renewal_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('virtual_order_flows_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});

Schema::table('real_order_group_package_cards', function (Blueprint $table) {
    $table->unique(['sim', 'order_id', 'refunded_at', 'deleted_at']);
});
