不要怂,就是干,撸起袖子干!

Commit 572adf67 by Jan Aagaard Meier

Fix the matching of key name for unique keys with numbers as name in mysql. Closes #2303

1 parent f7c25fca
Showing with 1 additions and 1 deletions
...@@ -53,7 +53,7 @@ module.exports = (function() { ...@@ -53,7 +53,7 @@ module.exports = (function() {
switch (err.errno || err.code) { switch (err.errno || err.code) {
case 1062: case 1062:
match = err.message.match(/Duplicate entry '(.*)' for key '(.*?)'$/); match = err.message.match(/Duplicate entry '(.*)' for key '?(.*?)$/);
return new sequelizeErrors.UniqueConstraintError({ return new sequelizeErrors.UniqueConstraintError({
fields: null, fields: null,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!