id(); $table->foreignId('target_id')->constrained()->cascadeOnDelete(); $table->foreignId('source_id')->constrained()->cascadeOnDelete(); $table->foreignId('run_by')->nullable()->constrained('users')->nullOnDelete(); $table->string('status')->default('pending'); $table->json('raw_payload')->nullable(); $table->text('summary')->nullable(); $table->text('error')->nullable(); $table->timestamp('ran_at')->nullable(); $table->timestamps(); $table->index(['target_id', 'source_id']); }); } public function down(): void { Schema::dropIfExists('findings'); } };