create_reference
Create foreign-key references between PDM tables with auto-created FK columns, configurable cardinality, and dry-run support.
Instructions
Create a foreign-key reference between two PDM tables (1:N from parent to child). If parent_columns/child_columns are omitted, the parent's primary key is used and FK columns are auto-created in the child (update_key=true, e.g. user 1--N order creates order.user_id). cardinality like '0,n' or '1,1'. Supports dry_run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| name | No | ||
| comment | No | ||
| dry_run | No | ||
| model_id | Yes | ||
| update_key | No | ||
| cardinality | No | 0,n | |
| child_table | Yes | ||
| parent_table | Yes | ||
| child_columns | No | ||
| parent_columns | No |