<?php

use App\Enums\ProductUnitEnum;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('order_archives_items', function (Blueprint $table) {
            $table->enum('productUnit', ProductUnitEnum::getKeys())->nullable()->change(); // mértékegység
            $table->enum('sellerUnit', ProductUnitEnum::getKeys())->nullable()->change(); // Eladasi egyseg
            $table->enum('amountUnit', ProductUnitEnum::getKeys())->nullable()->change(); // mennyisegi egyseg

        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('order_archives_items', function (Blueprint $table) {
            //
        });
    }
};
