<?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('payroll_settings', function (Blueprint $table) {
            $table->renameColumn('undertime_grace_period', 'late_grace_period_manager');
            $table->decimal('restday_meal_amount', 7,2)->nullable();
            $table->unsignedSmallInteger('restday_meal_every_hours')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('payroll_settings', function (Blueprint $table) {
            $table->renameColumn('undertime_grace_period', 'late_grace_period_manager');
            $table->dropColumn('restday_meal_amount');
            $table->dropColumn('restday_meal_every_hours');
        });
    }
};
