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
Translate NOT NULL violation to the specific exception #25451
Merged
sgrif
merged 1 commit into
rails:master
from
kamipo:translate_not_null_violation_to_specific_exception
Dec 6, 2016
Merged
Translate NOT NULL violation to the specific exception #25451
sgrif
merged 1 commit into
rails:master
from
kamipo:translate_not_null_violation_to_specific_exception
Dec 6, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @matthewd (@rails-bot has picked a reviewer for you, use r? to override) |
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
June 20, 2016 16:33
f115ed0
to
26b7cb5
Compare
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
June 20, 2016 18:39
26b7cb5
to
b2af501
Compare
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
2 times, most recently
from
August 6, 2016 23:55
1853221
to
da236ee
Compare
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
August 16, 2016 13:41
da236ee
to
818f8e1
Compare
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
September 14, 2016 10:01
818f8e1
to
ea91a50
Compare
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
October 29, 2016 07:37
ea91a50
to
3b24a28
Compare
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
December 5, 2016 22:17
3b24a28
to
c610bb6
Compare
alepore
reviewed
Dec 6, 2016
@@ -733,6 +733,8 @@ def add_options_for_index_columns(quoted_columns, **options) | |||
|
|||
# See https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html | |||
ER_DUP_ENTRY = 1062 | |||
ER_NOT_NULL_VIOLATION = 1048 | |||
ER_DO_NOT_HAVE_DEFUALT = 1364 |
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.
DEFUALT => DEFAULT
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.
Oh... thanks!
Raise `ActiveRecord::NotNullViolation` when a record cannot be inserted or updated because it would violate a not null constraint.
kamipo
force-pushed
the
translate_not_null_violation_to_specific_exception
branch
from
December 6, 2016 07:53
c610bb6
to
b270bc4
Compare
kamipo
added a commit
to kamipo/rails
that referenced
this pull request
Dec 9, 2016
matthewd
added a commit
that referenced
this pull request
Dec 9, 2016
Add a changelog entry for #25451 [ci skip]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Raise
ActiveRecord::NotNullViolation
when a record cannot be insertedor updated because it would violate a not null constraint.