<?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('tickets', function (Blueprint $table): void {
            $table->unsignedBigInteger('source_catalog_item_id')->nullable()->after('description');
            $table->unsignedBigInteger('source_variant_id')->nullable()->after('source_catalog_item_id');
        });
    }

    public function down(): void
    {
        Schema::table('tickets', function (Blueprint $table): void {
            $table->dropColumn(['source_catalog_item_id', 'source_variant_id']);
        });
    }
};
