Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Oct 1, 2024
1 parent 957cc71 commit d7e49aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/docs/reference/resource-properties/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ The structure of a constraint is:
- `name` (optional): Human-friendly name for this constraint. Supported by some data platforms.
- `columns` (model-level only): List of column names to apply the constraint over.

<VersionBlock firstVersion="1.9">

Foreign key constraints accept two additional inputs:
- `to`: A relation input, likely `ref()`, indicating the referenced table.
- `to_columns`: A list of column(s) in that table containing the corresponding primary or unique key.

This syntax for defining foreign keys uses `ref`, meaning it will capture dependencies and works across different environments. It's available in [dbt Cloud Versionless](/docs/dbt-versions/upgrade-dbt-version-in-cloud#versionless) and versions of dbt Core starting with v1.9.

<VersionBlock firstVersion="1.9">
<File name='models/schema.yml'>

```yml
Expand Down

0 comments on commit d7e49aa

Please sign in to comment.