<?php

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

class CreateCustomerForeignKeys extends Migration {

	public function up()
	{
		Schema::table('Customers', function(Blueprint $table) {
			$table->foreign('branch_id')->references('id')->on('Branches')
						->onDelete('set null')
						->onUpdate('set null');
		});
	}

	public function down()
	{
		Schema::table('Customers', function(Blueprint $table) {
			$table->dropForeign('Customer_branch_id_foreign');
		});
	}
}