feat(sqlite): Support force migration#6763
Merged
kodiakhq[bot] merged 8 commits intocloudquery:mainfrom Jan 19, 2023
Merged
Conversation
5 tasks
9993606 to
011fae1
Compare
erezrokah
commented
Jan 12, 2023
011fae1 to
06a6729
Compare
erezrokah
added a commit
to cloudquery/plugin-sdk
that referenced
this pull request
Jan 15, 2023
#### Summary <!-- 🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉 --> Related to cloudquery/cloudquery#6600, needed for cloudquery/cloudquery#6763 --- Use the following steps to ensure your PR is ready to be reviewed - [ ] Read the [contribution guidelines](../blob/main/CONTRIBUTING.md) 🧑🎓 - [ ] Run `go fmt` to format your code 🖊 - [ ] Lint your changes via `golangci-lint run` 🚨 (install golangci-lint [here](https://golangci-lint.run/usage/install/#local-installation)) - [ ] Update or add tests 🧪 - [ ] Ensure the status checks below are successful ✅
c7b7af2 to
af35c3d
Compare
yevgenypats
approved these changes
Jan 19, 2023
a8a725c to
d98d12e
Compare
This was referenced Jan 19, 2023
kodiakhq bot
pushed a commit
that referenced
this pull request
Jan 24, 2023
#### 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: 1. Adding a new column as a primary key -> The column was added, but the table PKs were left unchanged 2. Removing a PK from an existing column -> Was ignored 3. Adding a PK to an existing column -> Was ignored 4. Changing the type of an existing PK column -> Was handled by a regular non PK column type change. We dropped the column, but we need to drop the table. 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 + create` or `create new + copy old to new + drop old + rename new`. I went with the former for simplicity. <!--
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
To be merged after #6759, and needs cloudquery/plugin-sdk#604