ledgerrz/database/migrations/2026_06_15_223630_create_media_table.php
Daan Meijer a1adf1da1c
Some checks failed
linter / quality (push) Failing after 1m3s
tests / ci (8.3) (push) Failing after 48s
tests / ci (8.4) (push) Failing after 1m5s
tests / ci (8.5) (push) Failing after 1m4s
added media, mutation events, agent instructions
2026-06-15 22:30:17 +02:00

23 lines
622 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('media', function (Blueprint $table) {
$table->id();
$table->morphs('mediable'); // mediable_type, mediable_id
$table->string('file_path');
$table->string('file_name');
$table->string('mime_type');
$table->timestamps();
});
}
public function down(): void {
Schema::dropIfExists('media');
}
};