41 lines
1.1 KiB
PHP
41 lines
1.1 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();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 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');
|
||
|
});
|
||
|
}
|
||
|
}
|