<?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('provider_offers', function (Blueprint $table) {
            $table->boolean('curation_locked')->default(false)->after('is_hot');
        });

        Schema::table('campaigns', function (Blueprint $table) {
            $table->boolean('is_hot')->default(false)->after('featured');
            $table->boolean('curation_locked')->default(false)->after('is_hot');
        });
    }

    public function down(): void
    {
        Schema::table('campaigns', function (Blueprint $table) {
            $table->dropColumn(['is_hot', 'curation_locked']);
        });

        Schema::table('provider_offers', function (Blueprint $table) {
            $table->dropColumn('curation_locked');
        });
    }
};
