<?php

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

class AddForeignKeysToAbCheckoutNotifyTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('ab_checkout_notify', function(Blueprint $table)
		{
			$table->foreign('checkout_id', 'fk_cn_c')->references('id')->on('ab_checkout')->onUpdate('NO ACTION')->onDelete('NO ACTION');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('ab_checkout_notify', function(Blueprint $table)
		{
			$table->dropForeign('fk_cn_c');
		});
	}

}
