Skip to content
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

Validation for duplicate breakfast_options #14

Open
peter-ohara opened this issue May 11, 2017 · 0 comments
Open

Validation for duplicate breakfast_options #14

peter-ohara opened this issue May 11, 2017 · 0 comments

Comments

@peter-ohara
Copy link
Collaborator

More than one breakfast_option can be created with the same meal_id and serving_date.
Write model validations to prevent this from happening.

In addition, create a unique index on the breakfast_options database table to enforce this rule, even when the model validations are bypassed. (Model validations can be bypassed when there is a race condition, when that happens we expect that the database will enforce the uniqueness index and prevent duplicates as needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant