<?php

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

class EmployeeSalaryInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('employees_salary', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('employee_id');
            $table->string('pay_frequency');
            $table->string('pay_unit')->nullable();
            $table->integer('salary_amount');
            $table->string('bank_branch_name');
            $table->string('bank_account_no');
            $table->string('sacco_name')->nullable();
            $table->string('sacco_account_no')->nullable();
            $table->integer('created_by')->nullable();
            $table->integer('modified_by')->nullable();
            $table->tinyInteger('is_active')->default(1);
            $table->timestamps();
        });
    }

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