<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('salaries', function (Blueprint $table) {
            $table->string('designation')->nullable()->after('employee_id');
            $table->string('department')->nullable()->after('designation');
            $table->string('employee_code')->nullable()->after('department');
        });
    }

    public function down(): void
    {
        Schema::table('salaries', function (Blueprint $table) {
            $table->dropColumn(['designation', 'department', 'employee_code']);
        });
    }
};
