fix: sql error check (#3762)

This commit is contained in:
Livio Amstutz
2022-06-01 18:00:25 +02:00
committed by GitHub
parent d65761f388
commit 6506ce537d

View File

@@ -284,7 +284,7 @@ func isErrAlreadyExists(err error) bool {
if !ok {
return false
}
return sqlErr.Routine == "NewRelationAlreadyExistsError"
return sqlErr.Code == "42P07"
}
func createTableStatement(table *Table, tableName string, suffix string) string {