<?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('catalog_price_rules', function (Blueprint $table) {
            $table->json('gift_codes')->nullable()->after('internal_cost');
            $table->json('artist_codes')->nullable()->after('gift_codes');
            $table->json('other_cost_codes')->nullable()->after('artist_codes');
        });
    }

    public function down(): void
    {
        Schema::table('catalog_price_rules', function (Blueprint $table) {
            $table->dropColumn(['gift_codes', 'artist_codes', 'other_cost_codes']);
        });
    }
};

