Skip to content

Commit eac2c72

Browse files
authored
docs: Clarify that references go inside a postgres block (#291)
1 parent 814e7de commit eac2c72

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

documentation/topics/resources/references.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# References
22

3-
To configure the behavior of generated foreign keys on a resource, we use the `references` section.
3+
To configure the behavior of generated foreign keys on a resource, we use the `references` section, within the `postgres` configuration block.
44

55
For example:
66

77
```elixir
8-
references do
9-
reference :post, on_delete: :delete, on_update: :update, name: "comments_to_posts_fkey"
8+
postgres do
9+
# other PostgreSQL config here
10+
11+
references do
12+
reference :post, on_delete: :delete, on_update: :update, name: "comments_to_posts_fkey"
13+
end
1014
end
1115
```
1216

0 commit comments

Comments
 (0)