<?php

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

class CreateVideosTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('videos', function(Blueprint $table)
		{
			$table->bigInteger('id', true);
			$table->timestamps();
			$table->integer('date_created')->nullable();
			$table->string('filename', 128);
			$table->string('signature', 64)->nullable();
			$table->string('make', 32)->nullable();
			$table->string('model', 32)->nullable();
			$table->string('type', 32)->nullable();
			$table->string('codec', 32)->nullable();
			$table->integer('audiochannels')->nullable();
			$table->string('channelmode', 16)->nullable();
			$table->float('samplerate', 10, 0)->nullable();
			$table->integer('height')->nullable();
			$table->integer('width')->nullable();
			$table->float('length')->nullable();
			$table->integer('orientation')->nullable();
			$table->float('gps_lat', 10, 0)->nullable();
			$table->float('gps_lon', 10, 0)->nullable();
			$table->float('gps_altitude', 10, 0)->nullable();
			$table->boolean('duplicate')->nullable();
			$table->boolean('remove')->nullable();
			$table->boolean('flag')->nullable();
		});
	}


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

}
