<?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('route_card_processes', function (Blueprint $table) {
            $table->unsignedBigInteger('previous_process_id')->nullable()->after('id');
            // If you want to link it as a foreign key:
            // $table->foreign('previous_process_id')->references('id')->on('route_card_processes')->onDelete('set null');
        });
    }

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