<?php

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

class CreateEmployeeReferencesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('employee_references', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('employee_id');
            $table->string('person_name',255);
            $table->string('relation',255);
            $table->string('phone1',25);
            $table->string('phone2',25)->nullable();
            $table->string('email',255)->nullable();
            $table->text('address',255);
            $table->tinyInteger('added_by')->nullable();
            $table->tinyInteger('updated_by')->nullable();
            $table->tinyInteger('status')->nullable();
            $table->tinyInteger('approved_by')->nullable();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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