id(); $table->foreignId('tenant_id')->constrained()->cascadeOnDelete(); $table->foreignId('project_id')->nullable()->constrained()->nullOnDelete(); $table->string('title'); $table->text('description')->nullable(); $table->string('file_path'); $table->string('file_type', 50); $table->foreignId('uploaded_by')->constrained('users')->cascadeOnDelete(); $table->timestamps(); $table->index('tenant_id'); $table->index('project_id'); $table->index('uploaded_by'); }); } public function down(): void { Schema::dropIfExists('documents'); } };