<?php

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('orders', function (Blueprint $table) {

            $table->set('orderFlag', \App\Enums\OrderFlag::getValues())->nullable()->after('parent_id');
            $table->bigInteger('rel_id')->nullable()->after('orderFlag');
            $table->bigInteger('archive_id')->nullable()->after('rel_id');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('orders', function (Blueprint $table) {
            $table->dropColumn('orderFlag');
            $table->dropColumn('rel_id');
            $table->dropColumn('archive_id');
        });
    }
};
