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

Better MySQL Index Name support #51

Closed
guitarrapc opened this issue Jan 16, 2020 · 2 comments
Closed

Better MySQL Index Name support #51

guitarrapc opened this issue Jan 16, 2020 · 2 comments

Comments

@guitarrapc
Copy link

Description

When MySQL Index Name contains ., ALTER TABLE xxxx ADD index index.name(column) or similar statement will fail with Error 1103: Incorrect table name 'index'.

Let's say when Index Name is "Foo.Bar" then following mysqldef generate statement will fail.

ALTER TABLE xxxx ADD index Foo.Bar(column)

Do you support this scenario, or it should avoid via user?

Why

Because MySQL requires quote index name with ` when using . for name.

ALTER TABLE xxxx ADD index `Foo.Bar`(column)
@k0kubun
Copy link
Collaborator

k0kubun commented Jan 16, 2020

Thank you for reporting this. Could you try v0.5.11 which is being released at https://travis-ci.org/k0kubun/sqldef/builds/637809423?

@guitarrapc
Copy link
Author

thank you for prompt fix! I've confirmed v0.5.11 fixed issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants