<?php

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

class AddForeignKeysToAbServiceAdslTrafficTable extends Migration {

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


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

}
