<?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('leaves', function (Blueprint $table) {
            $table->time('leave_time_from')->nullable()->after('leave_time');
            $table->time('leave_time_to')->nullable()->after('leave_time_from');
        });
    }

    public function down(): void
    {
        Schema::table('leaves', function (Blueprint $table) {
            $table->dropColumn([
                'leave_time_from',
                'leave_time_to',
            ]);
        });
    }
};
