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

[MySQL] Functional/Expression indexes fail to migrate #579

Open
shubham-yb opened this issue Nov 10, 2022 · 0 comments
Open

[MySQL] Functional/Expression indexes fail to migrate #579

shubham-yb opened this issue Nov 10, 2022 · 0 comments

Comments

@shubham-yb
Copy link
Contributor

When we have a schema which contains Functional/Expression indexes in MYSQL, during the migration the index creation fails with a syntax error and the index doesn't get migrated.

Example:

Source schema:

create table func_check (
	id int primary key auto_increment,
	first_name VARCHAR(50),
	last_name VARCHAR(50)
);

CREATE INDEX idx_last_name ON func_check((lower(last_name)));

Exported Index:

CREATE INDEX idx_last_name ON func_check (lower(`last_name`));

Suggested changes:

Remove the backticks "" ` "" from the exported files.

CREATE INDEX idx_last_name ON func_check (lower(last_name));
@github-actions github-actions bot added the triage Needs to be triaged label Nov 10, 2022
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

1 participant