File "2015_01_20_100417_create_salary_table.php"

Full Path: /home/isoftco/public_html/hrm/database/migrations/2015_01_20_100417_create_salary_table.php
File size: 838 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

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

class CreateSalaryTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('salary', function(Blueprint $table)
		{
            $table->increments('id');

            $table->unsignedInteger("employee_id");
            
            $table->foreign('employee_id')
                ->references('id')->on('employees')
                ->onUpdate('cascade')
                ->onDelete('cascade');
            $table->string('type',100);
            $table->double('salary',10);
            $table->string('remarks');

            $table->timestamps();
		});
	}

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

}