<?php

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

class CreateHrTimeLogChangeRequestsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('hr_time_log_change_requests', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('time_log_id')->unsigned();
            $table->timestamp('time'); // Adjusted time
            $table->boolean('completed')->default(false);
            $table->boolean('declined')->default(false);
            $table->string('ip_address', 32)->nullable();
            $table->integer('created_by')->unsigned();
            $table->integer('updated_by')->unsigned(); // This is the person who approves/declines it...
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('hr_time_log_change_requests');
    }
}
