uuid('id')->primary(); $table->uuidMorphs('documentable'); $table->string('name'); $table->string('path', 500); $table->unsignedBigInteger('file_size')->nullable(); $table->string('mime_type', 100)->nullable(); $table->string('type', 100)->nullable()->default('general')->index(); $table->text('description')->nullable(); $table->foreignUuid('uploaded_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('documents'); } };