mirror of
https://github.com/reconurge/flowsint.git
synced 2026-03-08 23:04:17 -05:00
feat(migrations): backfill_edge_sketch_id
This commit is contained in:
8
neo4j-migrations/004_backfill_edge_sketch_id.cypher
Normal file
8
neo4j-migrations/004_backfill_edge_sketch_id.cypher
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// 004_backfill_edge_sketch_id.cypher
|
||||||
|
// Backfill sketch_id on relationships that are missing it.
|
||||||
|
// Copies sketch_id from the source node onto the relationship.
|
||||||
|
// Idempotent: only touches relationships where sketch_id IS NULL.
|
||||||
|
|
||||||
|
MATCH (a)-[r]->(b)
|
||||||
|
WHERE r.sketch_id IS NULL AND a.sketch_id IS NOT NULL
|
||||||
|
SET r.sketch_id = a.sketch_id;
|
||||||
Reference in New Issue
Block a user