<?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('inquiries', function (Blueprint $table) {
            $table->string('event_name')->nullable()->after('organization');
            $table->date('event_date')->nullable()->after('event_name');
            $table->string('audience_profile')->nullable()->after('event_date');
            $table->unsignedSmallInteger('staff_size')->nullable()->after('audience_profile');
            $table->string('event_format')->nullable()->after('staff_size');
            $table->string('delivery_mode')->nullable()->after('event_format');
            $table->string('venue')->nullable()->after('delivery_mode');
            $table->string('session_duration')->nullable()->after('venue');
            $table->json('topics')->nullable()->after('session_duration');
        });
    }

    public function down(): void
    {
        Schema::table('inquiries', function (Blueprint $table) {
            $table->dropColumn([
                'event_name',
                'event_date',
                'audience_profile',
                'staff_size',
                'event_format',
                'delivery_mode',
                'venue',
                'session_duration',
                'topics',
            ]);
        });
    }
};
