consistent order to unique key columns
This commit is contained in:
parent
ce9d13abf0
commit
8837a986ee
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ package drivers
|
|||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
@ -261,6 +262,7 @@ func (m *MySQLDriver) UniqueKeyInfo(schema, tableName string) ([]bdb.UniqueKey,
|
|||
}
|
||||
|
||||
ukey.Columns = strings.Split(columns, ",")
|
||||
sort.Strings(ukey.Columns)
|
||||
|
||||
ukeys = append(ukeys, ukey)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue