Skip to content

Support mysql unique key #196

@donychen1134

Description

@donychen1134

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions