Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mysql unique key #196

Open
donychen1134 opened this issue Jun 28, 2024 · 0 comments
Open

Support mysql unique key #196

donychen1134 opened this issue Jun 28, 2024 · 0 comments
Labels
question Further information is requested

Comments

@donychen1134
Copy link

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?

@donychen1134 donychen1134 added the question Further information is requested label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant