sqlchemy
sqlchemy copied to clipboard
Support mysql unique key
Requesting support for MySQL's unique key.
In the code blow, the unique type of idx has been ignored by the function createIndexSQL
func createIndexSQL(ts sqlchemy.ITableSpec, idx sqlchemy.STableIndex) string {
return fmt.Sprintf("CREATE INDEX `%s` ON `%s` (%s)", idx.Name(), ts.Name(), strings.Join(idx.QuotedColumns("`"), ","))
}
https://github.com/yunionio/sqlchemy/blob/master/backends/mysql/sync.go#L141
Can you please support MySQL unique key?