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

Comments

@shubham-yb
Copy link
Contributor

shubham-yb commented Jul 2, 2024

Jira Link: DB-13437
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants