47 lines
1.3 KiB
PHP
47 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class AddPhotoMetadataColumns extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::table('photos', function (Blueprint $table) {
|
|
$table->dateTime('taken_at')->nullable();
|
|
$table->integer('metadata_version')->nullable();
|
|
$table->string('camera_make')->nullable();
|
|
$table->string('camera_model')->nullable();
|
|
$table->string('camera_software')->nullable();
|
|
$table->integer('width')->nullable();
|
|
$table->integer('height')->nullable();
|
|
$table->integer('rotation')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('photos', function (Blueprint $table) {
|
|
$table->dropColumn('taken_at');
|
|
$table->dropColumn('metadata_version');
|
|
$table->dropColumn('camera_make');
|
|
$table->dropColumn('camera_model');
|
|
$table->dropColumn('camera_software');
|
|
$table->dropColumn('width');
|
|
$table->dropColumn('height');
|
|
$table->dropColumn('rotation');
|
|
});
|
|
}
|
|
}
|