// Why this exists: // Earlier files in this directory (01, 02, 09, 12, 13) MERGE many // OrchAdminProfile nodes via HAS_PROFILE only, leaving them with no // resource edges. // // Exclusion — DDEX Ingester find_or_create_account service identity // (profileId 3684, identityId ff8b855a-b316-4f31-87db-415da0e02079). MATCH (p:Profile {profileType: 'OrchAdminProfile'}) WHERE NOT (p)-[:HAS_ACCESS_TO]->() AND NOT (p)-[:DELETED_HAS_ACCESS_TO]->() AND p.profileId <> 3684 AND NOT EXISTS { MATCH (:Identity {id: 'ff8b855a-b316-4f31-87db-415da0e02079'})-[:HAS_PROFILE]-> (p) } WITH p MATCH (v:Vendor {id: '*'}) MERGE (p)-[r:HAS_ACCESS_TO]->(v) ON CREATE SET r.createdAt = datetime(), r.lastModifiedAt = datetime(), r.createdBy = 'PLATFORM-4898', r.lastModifiedBy = 'PLATFORM-4898';