<?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('shop_garment_fields', function (Blueprint $table) {
            $table->enum('field_type', ['text', 'select', 'checkbox'])->default('text')->after('is_required');
            $table->text('options')->nullable()->after('field_type'); // comma-separated suggestions
        });
    }

    public function down(): void
    {
        Schema::table('shop_garment_fields', function (Blueprint $table) {
            $table->dropColumn(['field_type', 'options']);
        });
    }
};
