New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checks documentation #377
Conversation
OlivierCavadenti
commented
Jan 6, 2022
- Add checks documentation for Checks Constraints Support knex#4874
sections/schema.js
Outdated
type: "method", | ||
method: "checkIn", | ||
example: "column.checkIn(values)", | ||
description: "Specify a check on column that test if the value of column is contains in a set of specified values.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains -> contained
sections/schema.js
Outdated
type: "method", | ||
method: "checkBetween", | ||
example: "column.checkBetween(values)", | ||
description: "Specify a check on column that test if the value of column is between a range of values.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
between -> within
sections/schema.js
Outdated
language: "js", | ||
content: ` | ||
knex.schema.createTable('product', function (table) { | ||
table.dropChecks(['check1', 'check2']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you expand with example of setting constraint with given id first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, that was already included.
approved!
@OlivierCavadenti minor text fixes still left |