Skip to content

Commit

Permalink
Small docs change to thecreate_constraint operation (#488)
Browse files Browse the repository at this point in the history
Better explain the `up` and `down` fields in the `create_constraint`
operation.
  • Loading branch information
andrew-farries authored Nov 26, 2024
1 parent 9c9518b commit 1279b7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ Required fields: `name`, `table`, `type`, `up`, `down`.
"create_constraint": {
"table": "name of table",
"name": "my_unique_constraint",
"columns": ["col1", "col2"],
"columns": ["column1", "column2"],
"type": "unique"| "check" | "foreign_key",
"check": "SQL expression for CHECK constraint",
"references": {
Expand All @@ -1169,12 +1169,12 @@ Required fields: `name`, `table`, `type`, `up`, `down`.
"on_delete": "ON DELETE behaviour, can be CASCADE, SET NULL, RESTRICT, or NO ACTION. Default is NO ACTION",
},
"up": {
"col1": "col1 || random()",
"col2": "col2 || random()"
"column1": "up SQL expressions for each column covered by the constraint",
...
},
"down": {
"col1": "col1",
"col2": "col2"
"column1": "up SQL expressions for each column covered by the constraint",
...
}
}
}
Expand Down

0 comments on commit 1279b7d

Please sign in to comment.