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 adding, removing and changing the type of columns in tables #503

Merged
merged 6 commits into from
Apr 9, 2021

Conversation

edwardbrowncross
Copy link
Contributor

The current behaviour is to drop the table and all its data when a column is added, removed, or modified (#446, #421). This PR mostly fixes this.

Now supported without having to drop and recreate the table:

  • Adding columns
  • Removing columns
  • Changing the data type of a column

Partially supported:

  • Renaming columns - the column is dropped and recreated leading to some data loss. There is not currently any better way to correlate columns than their name.

Test Plan

  • [ ✔] acceptance tests (plus made the existing ones more rigorous)
  • [✔ ] snowflake unit tests

References

#446
#421

ALTER TABLE documentation

Edward Browncross added 2 commits March 25, 2021 14:46
type of columns in tables. Renaming columns whilte
retaining data is not made possible by this change,
however.
@edwardbrowncross edwardbrowncross requested a review from a team as a code owner March 25, 2021 15:22
@AdamDewberry
Copy link
Contributor

Ooo this looks good, excited for a codeowner to review

@alldoami
Copy link
Contributor

alldoami commented Apr 2, 2021

/ok-to-test sha=dc7fdab

@alldoami
Copy link
Contributor

alldoami commented Apr 2, 2021

@edwardbrowncross could you update your branch with main?

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

Integration tests success for dc7fdab

@alldoami
Copy link
Contributor

alldoami commented Apr 9, 2021

/ok-to-test sha=54fb130

@github-actions
Copy link

github-actions bot commented Apr 9, 2021

Integration tests success for 54fb130

@alldoami alldoami merged commit 372862a into Snowflake-Labs:main Apr 9, 2021
yohei1126 pushed a commit to singlife/terraform-provider-snowflake that referenced this pull request Apr 18, 2021
anton-chekanov pushed a commit to anton-chekanov/terraform-provider-snowflake that referenced this pull request Jan 25, 2022
daniepett pushed a commit to daniepett/terraform-provider-snowflake that referenced this pull request Feb 9, 2022
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.

3 participants