consistent order to unique key columns

This commit is contained in:
Alex Grintsvayg 2017-08-23 13:36:13 -04:00
parent ce9d13abf0
commit 8837a986ee

View file

@ -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)
}