<?php

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

class CreateEmployeeEducationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('employee_educations')){
        Schema::create('employee_educations', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('edu_level_id');
            $table->string('institute_name',255);
            $table->string('major',255);
            $table->string('passing_year',255);
            $table->string('marks',255);
            $table->string('duration',255)->nullable();
            $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_educations');
    }
}
