<?php

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

class CreateTableTaskKeychains extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('task_keychains', function($table){
			
			$table->unsignedBigInteger('task_id');
			$table->unsignedBigInteger('keychain_id');
			$table->timestamps();

			// Composite Primary KEY
			$table->primary(array('task_id', 'keychain_id'));
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('task_keychains');
	}

}
