<?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_payment_contribution_histories', function (Blueprint $table) {
            $table->string('reference_no')->after('employee_pc_id')->index();
            $table->string('employee_id')->after('id')->index();
            $table->date('payroll_date')->after('date_contributed')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('employee_payment_contribution_histories', function (Blueprint $table) {
            $table->dropColumn('reference_no');
            $table->dropColumn('employee_id');
            $table->dropColumn('payroll_date');
        });
    }
};
