Skip to content

Comments

Support a complete ALTER TABLE statement in --alter#5

Merged
shlomi-noach merged 6 commits intomasterfrom
parse-alter-statement
Jul 29, 2020
Merged

Support a complete ALTER TABLE statement in --alter#5
shlomi-noach merged 6 commits intomasterfrom
parse-alter-statement

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