Skip to content
Tools/Nodes/migrate_properties

migrate_properties

Apply `UPG_PROPERTY_MIGRATIONS` graph-wide with no type rename or edge migration. Pure property pass: `drop_props`, `rename_top_level`, `lift_property_to_top_level`, `drop_when_self_referential`. Default `dry_run=true` previews the per-rule change set; pass `dry_run=false` to commit. Use when you want property cleanup standalone; `migrate_type` folds the same pass into its rename.

Nodesnon-atomic. Mutations are applied node-by-node; a mid-flight error may leave the graph partially migrated.

Arguments

dry_runbooleanoptional

Preview changes without applying (default true). Pass false to commit.

Returns

Shape
{ top_level_renames, lifted_properties, dropped_props, dropped_self_referential, dry_run }

Examples

Live call against the Notion example graph.

Output

{
  "top_level_renames": [],
  "lifted_properties": [
    {
      "id": "ec3d5479-4947-4bd9-9e77-b5ee01beb851",
      "from_property": "stage",
      "to": "status",
      "value_changed": true
    },
    {
      "id": "3f1c1804-b33b-4b1f-9094-c91cc8957912",
      "from_property": "validation_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "6719fce7-61e7-44df-b6cf-92f7c7312554",
      "from_property": "validation_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "7b22f5f3-b344-4e49-8d5a-35cf9087dc6c",
      "from_property": "validation_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "c969753e-8e7b-4c14-9c99-acba5b1862be",
      "from_property": "validation_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "6bc0cfd3-29a2-47b5-8f2e-746ded26351f",
      "from_property": "validation_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "2326222c-cfab-4793-bf58-818039939753",
      "from_property": "bug_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "1373c0c9-4aba-49fc-8a26-bbc78661ca5a",
      "from_property": "bug_status",
      "to": "status",
      "value_changed": false
    },
    {
      "id": "655c81dc-f827-45e3-b871-d9c78e569076",
      "from_property":
… (truncated)

Warnings

Default is `dry_run: true`. Pass `dry_run: false` to commit. Re-running with `dry_run: true` after a successful commit reports zero changes (idempotent on the canonical-properties shape).

See Also