<?php

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

class CreateDeductionConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('deduction_config', function(Blueprint $table){
            $table->increments('id');
            $table->string('deduction_name');
            $table->unsignedInteger('deduction_type');
            $table->unsignedInteger('tabulation_type');
            $table->unsignedInteger('tax_option');
            $table->unsignedInteger('range')->nullable();
            $table->unsignedInteger('one_time')->nullable()->default(0);
            $table->integer('created_by')->default(1);
            $table->integer('modified_by')->default(1);
            $table->timestamps();
        });
    }

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