<?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('item_categories', function (Blueprint $table) {
            $table->id();
            $table->string('name')->unique();
            $table->string('icon')->default('bi-tag');
            $table->timestamps();
        });

        // Make items.category a foreign key name (string) — no change needed in items table,
        // category column stays as string for simplicity.
    }

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