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 a complete ALTER TABLE statement in --alter #865

Merged
merged 7 commits into from
Aug 19, 2020

Conversation

shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jul 22, 2020

This PR supports a complete ALTER TABLE statement in --alter command line argument.

Until this PR, if one wanted to run a ALTER TABLE my_schema.my_table DROP COLUMN b, one would have to run gh-ost with:

  • --database=my_schema
  • --table=my_table
  • --alter="DROP COLUMN b"

Starting this PR, gh-ost can deduce schema and table names from the --alter statement. It's now valid to:

  • --ALTER="ALTER TABLE my_schema.my_table DROP COLUMN b"

as well as:

  • --database=my_schema --ALTER="ALTER TABLE my_table DROP COLUMN b"

@shlomi-noach
Copy link
Contributor Author

shlomi-noach commented Jul 22, 2020

I did intend to first open this PR against https://github.com/openark/gh-ost ; but hit the wrong button... Since we're already here, I'm also happy to submit it upstream.

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

Successfully merging this pull request may close these issues.

2 participants