<?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('employee_time_adjustments', function (Blueprint $table) {
            $table->boolean("processed")->default(false)->after("enabled")->index();
            $table->boolean("posted")->default(false)->after("processed")->index();
            $table->unsignedBigInteger("posting_id")->nullable()->after("posted")->index();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('employee_time_adjustments', function (Blueprint $table) {
            $table->dropColumn('processed');
            $table->dropColumn('posted');
            $table->dropColumn('posting_id');
        });
    }
};
