<?php

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

class CreateEmployeesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('employees')){
        Schema::create('employees', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',255);
            $table->string('personal_email',255);
            $table->string('phone',17);
            $table->text('present_address');
            $table->text('per_address')->nullable();
            $table->string('facebook',255)->nullable();
            $table->string('skype',255)->nullable();
            $table->string('linkedin',255)->nullable();
            $table->string('image',255)->nullable();
            $table->tinyInteger('ref_id');
            $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('employees');
    }
}
