Merge pull request #6552 from vbatts/vbatts-gh6551

sqlite-3.6.20-1 unique constraint message
This commit is contained in:
Tibor Vass 2014-06-19 16:54:43 -04:00
commit 4ad5af81c8
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ func IsNonUniqueNameError(err error) bool {
if strings.Contains(str, "UNIQUE constraint failed") && strings.Contains(str, "edge.name") {
return true
}
// sqlite-3.6.20-1.el6 returns:
// Set failure: Abort due to constraint violation: constraint failed
if strings.HasSuffix(str, "constraint failed") {
return true
}
return false
}