[#1] added images processing

This commit is contained in:
2024-12-30 02:42:07 +02:00
parent 51a6ab6c7a
commit a735462fae
5 changed files with 131 additions and 1 deletions
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('images', function (Blueprint $table) {
$table->id();
$table->decimal('aspect_ratio', 10, 2);
$table->integer('height');
$table->string('iso');
$table->text('file_path');
$table->decimal('vote_average', 10, 2);
$table->integer('vote_count');
$table->integer('width');
$table->string('type');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('images');
}
};
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('movie_images', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('movie_id');
$table->unsignedBigInteger('image_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('movie_images');
}
};