create separated exif metadata table for files

This commit is contained in:
Milos Holba
2022-01-26 17:42:01 +01:00
parent 630cefee41
commit d16d73680f
13 changed files with 338 additions and 223 deletions

View File

@@ -25,7 +25,6 @@ class CreateFilesTable extends Migration
$table->text('filesize');
$table->text('type')->nullable();
$table->longText('metadata')->nullable();
$table->enum('author', ['user', 'member', 'visitor'])->default('user');

View File

@@ -27,8 +27,8 @@ class CreateUserSettingsTable extends Migration
$table->text('country')->nullable();
$table->text('phone_number')->nullable();
$table->decimal('timezone', 10, 1)->nullable();
$table->text('emoji_type')->default('twemoji');
$table->text('theme_mode')->default('system');
$table->text('emoji_type');
$table->text('theme_mode');
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
});

View File

@@ -0,0 +1,54 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateExifsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('exifs', function (Blueprint $table) {
$table->uuid('id')->primary()->index();
$table->uuid('file_id')->index();
$table->timestamp('date_time_original')->nullable();
$table->string('artist')->nullable();
$table->integer('height')->nullable();
$table->integer('width')->nullable();
$table->string('x_resolution')->nullable();
$table->string('y_resolution')->nullable();
$table->integer('color_space')->nullable();
$table->string('camera')->nullable();
$table->string('model')->nullable();
$table->string('aperture_value')->nullable();
$table->string('exposure_time')->nullable();
$table->string('focal_length')->nullable();
$table->integer('iso')->nullable();
$table->string('aperture_f_number')->nullable();
$table->string('ccd_width')->nullable();
$table->string('longitude')->nullable();
$table->string('latitude')->nullable();
$table->string('longitude_ref')->nullable();
$table->string('latitude_ref')->nullable();
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('exifs');
}
}