<?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::create('product_config_option_values', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('option_id');
            $table->string('value');
            $table->integer('order')->default(1);
            $table->boolean('status')->default(true);
            $table->timestamps();

            $table->index(['option_id', 'order']);
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('product_config_option_values');
    }
};
