<?php

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

class CreatePersonVideoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('person_video', function(Blueprint $table)
		{
			$table->id();
			$table->timestamps();
			$table->integer('person_id');
			$table->bigInteger('video_id');

			$table->unique(['person_id','video_id']);
		});
	}


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

}
