<?php

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

class AddRequiredDocumentFieldToEmpDocumentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('emp_documents', function (Blueprint $table) {
            Schema::table('emp_documents', function (Blueprint $table) {
                $table->string('required_document_field')->nullable()->after('required_document');
                $table->text('value')->after('required_document_field');
            });
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('emp_documents', function (Blueprint $table) {
            $table->dropColumn('required_document_field');
        });
    }
}
