feat(sqlite-migrate): Support PK changes to schema#7006
Merged
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom Jan 24, 2023
Merged
feat(sqlite-migrate): Support PK changes to schema#7006kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
kodiakhq[bot] merged 4 commits intocloudquery:mainfrom
Conversation
disq
approved these changes
Jan 24, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
Jan 24, 2023
🤖 I have created a release *beep* *boop* --- ## [1.2.0](plugins-destination-sqlite-v1.1.6...plugins-destination-sqlite-v1.2.0) (2023-01-24) ### Features * **sqlite-migrate:** Support PK changes to schema ([#7006](#7006)) ([dddd852](dddd852)) * **sqlite:** Collect and report migration errors before starting the migration ([#6759](#6759)) ([a80e9d9](a80e9d9)) * **sqlite:** Support force migration ([#6763](#6763)) ([19bba77](19bba77)) ### Bug Fixes * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.28.0 ([#7009](#7009)) ([12ac005](12ac005)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related to #6600, #6763 and #6759
This PR adds support for PK changes migration. Before we would just ignore them, so the following use cases were ignored:
SQLite is quite limited in what can be done with PK changes. On any PK change we need to recreate the table, so either
drop + createorcreate new + copy old to new + drop old + rename new.I went with the former for simplicity.