Skip to content

Commit 121e78b

Browse files
committed
Fixed Match method for primary key data
1 parent bcb3122 commit 121e78b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

primarykey.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ func (c *PrimaryKeySchema) Compare(obj interface{}) int {
3131
return +999
3232
}
3333
val := _compareString(c.row["table_name"], c2.row["table_name"])
34-
return val
34+
if val != 0 {
35+
return val
36+
}
37+
38+
return _compareString(c.row["constraint_name"], c2.row["constraint_name"])
3539
}
3640

3741
// Add returns SQL to add the primary key

0 commit comments

Comments
 (0)