Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
"Constraints" are rules for more in-depth checks performed at SQL level vs. at the Sequelize level. A typical example is checking that the email submitted is a unique email address. A user submits an entry, and their email gets checked against other emails in the database to ensure that it's unique.
Validation checks happen before any SQL is executed against the database. On the other hand, unique constraints (even allowNull
) map to their database counterparts.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up