forked from cloudquery/cloudquery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(table-diff): Support PK changes (cloudquery#5638)
<!-- 🎉 Thank you for making CloudQuery awesome by submitting a PR 🎉 --> #### Summary This PR fixes the table diff logic to support PK changes. For example cloudquery#5636 (comment) is wrong. <!-- Use the following steps to ensure your PR is ready to be reviewed - [ ] Read the [contribution guidelines](../blob/main/CONTRIBUTING.md) 🧑🎓 - [ ] Test locally on your own infrastructure - [ ] 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 ✅ --->
- Loading branch information
Showing
3 changed files
with
90 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
diff --git a/plugins/source/gcp/docs/tables/gcp_resourcemanager_projects.md b/plugins/source/gcp/docs/tables/gcp_resourcemanager_projects.md | ||
index a39e930ae27..5c8b8b5ea39 100644 | ||
--- a/plugins/source/gcp/docs/tables/gcp_resourcemanager_projects.md | ||
+++ b/plugins/source/gcp/docs/tables/gcp_resourcemanager_projects.md | ||
@@ -2,7 +2,7 @@ | ||
|
||
|
||
|
||
-The primary key for this table is **_cq_id**. | ||
+The composite primary key for this table is (**project_id**, **name**). | ||
|
||
|
||
|
||
@@ -11,10 +11,10 @@ The primary key for this table is **_cq_id**. | ||
| ------------- | ------------- | | ||
|_cq_source_name|String| | ||
|_cq_sync_time|Timestamp| | ||
-|_cq_id (PK)|UUID| | ||
+|_cq_id|UUID| | ||
|_cq_parent_id|UUID| | ||
-|project_id|String| | ||
-|name|String| | ||
+|project_id (PK)|String| | ||
+|name (PK)|String| | ||
|parent|String| | ||
|state|String| | ||
|display_name|String| |