-
Notifications
You must be signed in to change notification settings - Fork 490
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
mysql: add foreign key error #675
Conversation
mysql/errcode.go
Outdated
@@ -939,6 +939,7 @@ const ( | |||
ErrSpatialFunctionalIndex = 3760 | |||
ErrWrongKeyColumnFunctionalIndex = 3761 | |||
ErrFunctionalIndexOnField = 3762 | |||
ErrReferencedForeignKey = 3780 |
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.
According to the MySQL document,
Error number: 3780; Symbol: ER_FK_INCOMPATIBLE_COLUMNS; SQLSTATE: HY000
Message: Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible.
The error name should be ErrFKIncompatibleColumns
.
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.
great, done.
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
=======================================
Coverage 80.13% 80.13%
=======================================
Files 33 33
Lines 13001 13001
=======================================
Hits 10418 10418
Misses 1964 1964
Partials 619 619 Continue to review full report at Codecov.
|
LGTM |
(CLA is borked) |
* mysql: add foreign key error * address comment
* mysql: add foreign key error * address comment
What problem does this PR solve?
Add error msg