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] Multiple indexes on the same column of a table error out on import #1609

Open
shubham-yb opened this issue Jul 2, 2024 · 0 comments
Labels
triage Needs to be triaged

Comments

@shubham-yb
Copy link
Contributor

Voyager renames the indexes with a set pattern
table_name_column_name during export, thus having multiple indexes on the same column of a table will have the same name and will error out during import.

Example:

Sample schema on the source:

create table test(id int, k int);
create index index1 on test(k);
create index index2 on test(k);

Exported Indexes:

CREATE INDEX test_k ON test (k);
CREATE INDEX test_k ON test (k);

Suggested Changes:

  1. Rename one of the indexes to some other name. (ex: test_k2)
  2. Drop index1 or index2 on the source before exporting.
@github-actions github-actions bot added the triage Needs to be triaged label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant