mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 07:31:09 -05:00
Add photo management features, update database configuration, and enhance park model seeding
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user