Files
Additional/database/migrations/2025_12_09_create_hero_images_table.php
T
twotalesanimation 6de01c13c5 New Initial Commit
2025-12-09 12:04:54 +02:00

33 lines
945 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('hero_images', function (Blueprint $table) {
$table->id();
$table->enum('page', ['home', 'wallpaper', 'mural']);
$table->string('image_path');
$table->string('title');
$table->text('description')->nullable();
$table->string('button_text')->nullable();
$table->string('button_link')->nullable();
$table->integer('sort_order')->default(0);
$table->boolean('is_active')->default(true);
$table->timestamps();
$table->index('page');
$table->index('is_active');
});
}
public function down(): void
{
Schema::dropIfExists('hero_images');
}
};