pp-planer/database/migrations/2026_03_01_100800_create_slides_table.php
Thorsten Bus 04d271f96a style: apply Laravel Pint formatting across codebase
Auto-formatted by Laravel Pint (default Laravel preset): string
concatenation spacing, anonymous class brace placement, constructor
body shorthand, import ordering, and assertion indentation.
2026-03-02 23:02:03 +01:00

35 lines
1 KiB
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('slides', function (Blueprint $table) {
$table->id();
$table->enum('type', ['information', 'moderation', 'sermon']);
$table->foreignId('service_id')->nullable()->constrained()->nullOnDelete();
$table->string('original_filename');
$table->string('stored_filename');
$table->string('thumbnail_filename');
$table->date('expire_date')->nullable();
$table->string('uploader_name')->nullable();
$table->timestamp('uploaded_at');
$table->softDeletes();
$table->timestamps();
$table->index('service_id');
$table->index('expire_date');
$table->index('type');
});
}
public function down(): void
{
Schema::dropIfExists('slides');
}
};