<?php

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

class CreateEmployeeDocumentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('employee_documents')){
        Schema::create('employee_documents', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('document_id');
            $table->tinyInteger('employee_id');
            $table->string('file',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_documents');
    }
}
