id(); $table->morphs('mediable'); // project, phase, layer, feature $table->string('name'); $table->string('file_path'); $table->string('file_type'); // image/jpeg, application/pdf, etc. $table->string('file_extension', 10); $table->unsignedInteger('file_size'); $table->enum('category', ['image', 'document', 'other'])->default('image'); $table->text('description')->nullable(); $table->json('metadata')->nullable(); // EXIF, GPS coords, etc. $table->foreignId('uploaded_by')->constrained('users'); $table->timestamps(); }); } public function down() { Schema::dropIfExists('media'); } };