-
Notifications
You must be signed in to change notification settings - Fork 499
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
Cannot run a fetch with AWS/Postgresql a second time because it doesnt properly use IF EXISTS #20
Comments
@melaraj2 Thanks for opening the issue. Can you try deleting the database and running this again + making sure you use the latest release. I'm not able to reproduce this. |
sure here is the full shell session
|
can you try dropping the postgress database before running |
I did that (Dropped all tables and sequences), I ran the first time and it works. I am now getting rate exceeded, but I have already opened a ticket with AWS on that. So ignore that bit.
|
Thank you for pointing out about the password. its been changed, althouth the instance in a private network. Here is a full set of command that you could try to reproduce if you have docker installed.
|
I've updated the |
I am still seeing the same issue. The below is with Pg 12.5
|
I have to disagree.
|
Well, actually it is the same issue, but a different database object. |
Tested on Postgresql 12.5 and 9.6.17 #20
You are correct. I've tested it this time on postgresql 9.6.17 and 12.5 hopefully v0.6.6 fixes it. Can you please test it? Thanks for your patience! |
Indeed it works now! |
when a specific resource is collected say |
It would be great if there was a changelog table. It can be done in an automated way
|
If you are interested, I will open a new issue, this could be done in a separate function using reflection basically you pass the new record and old record, and the function analyzes the differences and insert the changelog record. I am mostly a Java guy, but in Go, there must be "reflections" equivalent to pull this off without knowing the structure of each record. |
Yes, definitely interested. Please open an issue. Thx! |
🤖 I have created a release *beep* *boop* --- ## [0.1.3](https://github.com/cloudquery/cq-provider-cloudflare/compare/v0.1.2...v0.1.3) (2022-08-11) ### Features * Added Images ([cloudquery#20](https://github.com/cloudquery/cq-provider-cloudflare/issues/20)) ([0bbd716](https://github.com/cloudquery/cq-provider-cloudflare/commit/0bbd71614828d921602f9a66afa31029cd8cad58)) * Waf overrides ([cloudquery#19](https://github.com/cloudquery/cq-provider-cloudflare/issues/19)) ([a6bc446](https://github.com/cloudquery/cq-provider-cloudflare/commit/a6bc4464b6c523de13acf06418b5d5bd9f89dc23)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [0.1.1](cloudquery/cq-provider-github@v0.1.0...v0.1.1) (2022-08-07) ### Bug Fixes * **deps:** Update module github.com/cloudquery/cq-gen to v0.0.7 ([#14](cloudquery/cq-provider-github#14)) ([58d59db](cloudquery/cq-provider-github@58d59db)) * **deps:** Update module github.com/cloudquery/cq-gen to v0.0.8 ([#19](cloudquery/cq-provider-github#19)) ([36b0433](cloudquery/cq-provider-github@36b0433)) * Issue fetching ([#20](cloudquery/cq-provider-github#20)) ([1753dd6](cloudquery/cq-provider-github@1753dd6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
When running with Postgres as the database, running a second time fails when attempting to update the schema:
2020/12/27 07:48:33 /go/src/github.com/troian/golang-cross-example/providers/aws/ec2/vpc_peering_connections.go:193 ERROR: column "requester_option_allow_egress_from_local_classic_link_to_remote" of relation "aws_ec2_vpc_peering_connections" already exists (SQLSTATE 42701) [157.994ms] [rows:0] ALTER TABLE "aws_ec2_vpc_peering_connections" ADD "requester_option_allow_egress_from_local_classic_link_to_remote_vpc" boolean Error: ERROR: column "requester_option_allow_egress_from_local_classic_link_to_remote" of relation "aws_ec2_vpc_peering_connections" already exists (SQLSTATE 42701)
The text was updated successfully, but these errors were encountered: