File "2015_06_08_051127_add_expense_to_payrolls.php"
Full Path: /home/isoftco/public_html/hrm/database/migrations/2015_06_08_051127_add_expense_to_payrolls.php
File size: 685 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddExpenseToPayrolls extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('payrolls', function(Blueprint $table)
{
$table->string('expense');
$table->unsignedInteger("company_id");
$table->foreign("company_id")->references("id")->on("companies")->onUpdate("cascade")->onDelete("cascade");
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('payrolls', function(Blueprint $table)
{
$table->dropColumn('expense');
});
}
}