<?php

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

class AddForeignKeysToAbExportItemTable extends Migration {

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


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

}
