photo/database/migrations/2016_06_03_055603_create_photo_table.php

49 lines
1.1 KiB
PHP
Raw Normal View History

2016-06-22 05:49:20 +00:00
<?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');
}
}