Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix migrations (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
roneli authored Sep 9, 2021
1 parent 6644c9e commit 3b48b06
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
10 changes: 0 additions & 10 deletions resources/migrations/2_v0.5.11.down.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
ALTER TABLE "aws_ec2_instance_network_interface_ipv6_addresses" RENAME COLUMN "instance_network_interface_cq_id" TO "instance_network_interface_id";

ALTER TABLE "aws_ec2_instance_network_interface_private_ip_addresses" RENAME COLUMN "instance_network_interface_cq_id" TO "instance_network_interface_id";

ALTER TABLE "aws_access_analyzer_analyzer_finding_sources" DROP CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_pk";

ALTER TABLE aws_access_analyzer_analyzer_finding_sources
ADD CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_pk"
UNIQUE ("cq_id");

ALTER TABLE aws_access_analyzer_analyzer_finding_sources
ADD CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_pk"
PRIMARY KEY ("analyzer_finding_cq_id", "type", "detail_access_point_arn");
10 changes: 0 additions & 10 deletions resources/migrations/2_v0.5.11.up.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
ALTER TABLE "aws_ec2_instance_network_interface_ipv6_addresses" RENAME COLUMN "instance_network_interface_id" TO instance_network_interface_cq_id;

ALTER TABLE "aws_ec2_instance_network_interface_private_ip_addresses" RENAME COLUMN "instance_network_interface_id" TO instance_network_interface_cq_id;


ALTER TABLE "aws_access_analyzer_analyzer_finding_sources" DROP CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_pk";

ALTER TABLE "aws_access_analyzer_analyzer_finding_sources" DROP CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_cq_id_key";

ALTER TABLE aws_access_analyzer_analyzer_finding_sources
ADD CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_pk"
PRIMARY KEY(cq_id);

Empty file.
8 changes: 8 additions & 0 deletions resources/migrations/3_v0.5.12.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE "aws_access_analyzer_analyzer_finding_sources" DROP CONSTRAINT IF EXISTS "aws_access_analyzer_analyzer_finding_sources_pk";

ALTER TABLE "aws_access_analyzer_analyzer_finding_sources" DROP CONSTRAINT IF EXISTS "aws_access_analyzer_analyzer_finding_sources_cq_id_key";

ALTER TABLE aws_access_analyzer_analyzer_finding_sources
ADD CONSTRAINT "aws_access_analyzer_analyzer_finding_sources_pk"
PRIMARY KEY(cq_id);

0 comments on commit 3b48b06

Please sign in to comment.