make(Kernel::class)->bootstrap(); portalQaAssertTarget($target); $name = '2026_10_09_190000_prepare_investor_path'; $columns = ['investor_journeys.path_definition_id' => Schema::hasColumn('investor_journeys', 'path_definition_id'), 'journey_steps.path_detail' => Schema::hasColumn('journey_steps', 'path_detail')]; $definitions = DB::table('questionnaire_versions')->where('code', 'investor-path-19')->get(['id', 'status', 'schema_snapshot'])->map(fn ($r) => ['id' => $r->id, 'status' => $r->status, 'sha256' => hash('sha256', $r->schema_snapshot)])->all(); $proof = ['captured_at' => gmdate('c'), 'target' => $target, 'active_writes' => 0, 'migration' => $name, 'ledger' => DB::table('migrations')->where('migration', $name)->exists(), 'columns' => $columns, 'definitions' => $definitions, 'resources_030000' => DB::table('migrations')->where('migration', '2026_10_09_030000_extend_opportunity_resources')->exists(), 'profiles_040000' => DB::table('migrations')->where('migration', '2026_10_10_040000_create_portal_profile_authorization')->exists(), 'authorities' => DB::table('authorities')->where('status', 'published')->get(['id', 'label_pt_mz'])->all()]; file_put_contents(dirname(__DIR__).'/storage/app/private/investmoz-v2/portal-audit/opportunity-semantic-environment-qa.json', json_encode($proof, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR)); echo json_encode($proof, JSON_THROW_ON_ERROR);