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 #5

Merged
merged 6 commits into from
Jul 29, 2020

Conversation

shlomi-noach
Copy link

@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
Author

correlated: github#865

@shlomi-noach shlomi-noach merged commit 9ccde4f into master Jul 29, 2020
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.

1 participant