Add photo management features, update database configuration, and enhance park model seeding

This commit is contained in:
pacnpal
2025-02-25 15:44:21 -05:00
parent 15b2d4ebcf
commit b4462ba89e
31 changed files with 2700 additions and 71 deletions

View File

@@ -0,0 +1,42 @@
<?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('photos', function (Blueprint $table) {
$table->id();
$table->morphs('photoable');
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->string('file_path');
$table->string('file_name');
$table->integer('file_size')->nullable();
$table->string('mime_type')->nullable();
$table->integer('width')->nullable();
$table->integer('height')->nullable();
$table->integer('position')->default(0);
$table->boolean('is_featured')->default(false);
$table->string('alt_text')->nullable();
$table->string('credit')->nullable();
$table->string('source_url')->nullable();
$table->json('metadata')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('photos');
}
};