<?php

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

class CreatePhotoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('photo', function(Blueprint $table)
		{
			$table->bigInteger('id', true);
			$table->timestamps();
			$table->integer('date_taken')->nullable();
			$table->smallInteger('subsectime')->nullable();
			$table->string('filename', 128);
			$table->string('signature', 64)->nullable();
			$table->string('make', 32)->nullable();
			$table->string('model', 32)->nullable();
			$table->integer('height')->nullable();
			$table->integer('width')->nullable();
			$table->integer('orientation')->nullable();
			$table->float('gps_lat', 10, 0)->nullable();
			$table->float('gps_lon', 10, 0)->nullable();
			$table->binary('thumbnail', 65535)->nullable();
			$table->boolean('duplicate')->nullable();
			$table->boolean('remove')->nullable();
			$table->boolean('flag')->nullable();
		});
	}


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

}