Skip to content

Commit cba4c23

Browse files
update index, fix vendor bug on tier, remove update avatar updated time default, fix fga docker compose (#2311)
Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
1 parent ae21b50 commit cba4c23

42 files changed

Lines changed: 2834 additions & 2654 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.task/checksum/generate-ent-smart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5c4fd560f5af11c2e8c76c1dfa910647
1+
3de521d0aafd9df04f3838fd1349ee18
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12962a65daa96858436ddc5ab7e1504e
1+
94ce339301fbe2c3f3c3477e76f0170c

common/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
)
2222

2323
require (
24-
ariga.io/atlas v1.1.0 // indirect
24+
ariga.io/atlas v1.2.0 // indirect
2525
entgo.io/contrib v0.7.0 // indirect
2626
github.com/99designs/gqlgen v0.17.89 // indirect
2727
github.com/XSAM/otelsql v0.41.0 // indirect

common/go.sum

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
ariga.io/atlas v1.1.0 h1:Dk9Xemh6pr5RogNCsFylf/9ozhSPWDqzHb8EkR2rA78=
2-
ariga.io/atlas v1.1.0/go.mod h1:esBbk3F+pi/mM2PvbCymDm+kWhaOk4PaaiegQdNELk8=
1+
ariga.io/atlas v1.2.0 h1:PJZzG1zTA8SzMR1giJ7XnQe4VjfDWEbJjHnIaK45BFg=
32
entgo.io/contrib v0.7.0 h1:4Ghx8O0rqSMmca3FIJ6QyZbQAoLvdzWqLMl1MbHFEEw=
43
entgo.io/contrib v0.7.0/go.mod h1:zbPSUrbn+6dfyv8S9HWEvn1MyGpO95ik2lUNgaqWTt4=
54
entgo.io/ent v0.14.6 h1:/f2696BpwuWAEEG6PVGWflg6+Inrpq4pRWuNlWz/Skk=
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
-- +goose Up
2+
-- drop index "control_auditor_reference_id_deleted_at_owner_id" from table: "controls"
3+
DROP INDEX "control_auditor_reference_id_deleted_at_owner_id";
4+
-- drop index "control_reference_id_deleted_at_owner_id" from table: "controls"
5+
DROP INDEX "control_reference_id_deleted_at_owner_id";
6+
-- drop index "control_standard_id_deleted_at_owner_id" from table: "controls"
7+
DROP INDEX "control_standard_id_deleted_at_owner_id";
8+
-- create index "control_auditor_reference_id" to table: "controls"
9+
CREATE INDEX "control_auditor_reference_id" ON "controls" ("auditor_reference_id") WHERE (deleted_at IS NULL);
10+
-- create index "control_ref_code" to table: "controls"
11+
CREATE INDEX "control_ref_code" ON "controls" ("ref_code") WHERE ((deleted_at IS NULL) AND (owner_id IS NOT NULL) AND ((status)::text <> 'ARCHIVED'::text));
12+
-- create index "control_reference_id" to table: "controls"
13+
CREATE INDEX "control_reference_id" ON "controls" ("reference_id") WHERE (deleted_at IS NULL);
14+
-- drop index "customtypeenum_object_type" from table: "custom_type_enums"
15+
DROP INDEX "customtypeenum_object_type";
16+
-- create index "customtypeenum_object_type" to table: "custom_type_enums"
17+
CREATE INDEX "customtypeenum_object_type" ON "custom_type_enums" ("object_type") WHERE (deleted_at IS NULL);
18+
-- create index "customtypeenum_name_field" to table: "custom_type_enums"
19+
CREATE INDEX "customtypeenum_name_field" ON "custom_type_enums" ("name", "field") WHERE (deleted_at IS NULL);
20+
-- modify "entities" table
21+
ALTER TABLE "entities" ALTER COLUMN "tier" SET DEFAULT 'STANDARD';
22+
23+
-- +goose Down
24+
-- reverse: modify "entities" table
25+
ALTER TABLE "entities" ALTER COLUMN "tier" DROP DEFAULT;
26+
-- reverse: create index "customtypeenum_name_field" to table: "custom_type_enums"
27+
DROP INDEX "customtypeenum_name_field";
28+
-- reverse: create index "customtypeenum_object_type" to table: "custom_type_enums"
29+
DROP INDEX "customtypeenum_object_type";
30+
-- reverse: drop index "customtypeenum_object_type" from table: "custom_type_enums"
31+
CREATE INDEX "customtypeenum_object_type" ON "custom_type_enums" ("object_type");
32+
-- reverse: create index "control_reference_id" to table: "controls"
33+
DROP INDEX "control_reference_id";
34+
-- reverse: create index "control_ref_code" to table: "controls"
35+
DROP INDEX "control_ref_code";
36+
-- reverse: create index "control_auditor_reference_id" to table: "controls"
37+
DROP INDEX "control_auditor_reference_id";
38+
-- reverse: drop index "control_standard_id_deleted_at_owner_id" from table: "controls"
39+
CREATE INDEX "control_standard_id_deleted_at_owner_id" ON "controls" ("standard_id", "deleted_at", "owner_id");
40+
-- reverse: drop index "control_reference_id_deleted_at_owner_id" from table: "controls"
41+
CREATE INDEX "control_reference_id_deleted_at_owner_id" ON "controls" ("reference_id", "deleted_at", "owner_id");
42+
-- reverse: drop index "control_auditor_reference_id_deleted_at_owner_id" from table: "controls"
43+
CREATE INDEX "control_auditor_reference_id_deleted_at_owner_id" ON "controls" ("auditor_reference_id", "deleted_at", "owner_id");
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- +goose Up
2+
-- modify "entity_history" table
3+
ALTER TABLE "entity_history" ALTER COLUMN "tier" SET DEFAULT 'STANDARD';
4+
5+
-- +goose Down
6+
-- reverse: modify "entity_history" table
7+
ALTER TABLE "entity_history" ALTER COLUMN "tier" DROP DEFAULT;

db/migrations-goose-postgres/atlas.sum

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
h1:9sdp3wRsIXdHw8ocUty8LF9EfoeUvwfQCEwfqDQxsIc=
1+
h1:9/sZ2QVc+2tro1EExagLmBAhHiKA94EwoOwOjqELKE8=
22
20251229183203_init.sql h1:g/05irCXoqKFObJV2PPLuvDRqma+da41VPsZ5fXQgfE=
33
20251229183205_init_history.sql h1:P/q2kAHb8zfNMOWzYkKtPbOwoh9GdJUQljSNAiPEjYI=
44
20251231045229_workflow.sql h1:uUPRLO4yw2y//fPGeqIXRrL+fiEN1TRGkF4wHiqPaPk=
@@ -111,3 +111,5 @@ h1:9sdp3wRsIXdHw8ocUty8LF9EfoeUvwfQCEwfqDQxsIc=
111111
20260414152907_nonuniqueuuid.sql h1:btv/8OgYI99xrvUDoG/1Zf99veC+OwHKDQshJ7CQebY=
112112
20260415112252_evidence_review.sql h1:V1w2ro9FzgMlXbsUh8qjK3B/A0W2rcJvD2dj49IT+kU=
113113
20260415112303_evidence_review_history.sql h1:mKLSwKoGyWn+HeYtuk1F0Cw8JxZJpCt8Or+sG0bmnW8=
114+
20260416163449_index_update.sql h1:QpSTH9HSaPF8iiJCrveaPfA/OBHJ9lZ54hLo6zUiIJY=
115+
20260416163452_index_update_history.sql h1:irWaOs6FtOos55C1N14kV7ko7ors6dEPVMpcC6kdvYc=
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Drop index "control_auditor_reference_id_deleted_at_owner_id" from table: "controls"
2+
DROP INDEX "control_auditor_reference_id_deleted_at_owner_id";
3+
-- Drop index "control_reference_id_deleted_at_owner_id" from table: "controls"
4+
DROP INDEX "control_reference_id_deleted_at_owner_id";
5+
-- Drop index "control_standard_id_deleted_at_owner_id" from table: "controls"
6+
DROP INDEX "control_standard_id_deleted_at_owner_id";
7+
-- Create index "control_auditor_reference_id" to table: "controls"
8+
CREATE INDEX "control_auditor_reference_id" ON "controls" ("auditor_reference_id") WHERE (deleted_at IS NULL);
9+
-- Create index "control_ref_code" to table: "controls"
10+
CREATE INDEX "control_ref_code" ON "controls" ("ref_code") WHERE ((deleted_at IS NULL) AND (owner_id IS NOT NULL) AND ((status)::text <> 'ARCHIVED'::text));
11+
-- Create index "control_reference_id" to table: "controls"
12+
CREATE INDEX "control_reference_id" ON "controls" ("reference_id") WHERE (deleted_at IS NULL);
13+
-- Drop index "customtypeenum_object_type" from table: "custom_type_enums"
14+
DROP INDEX "customtypeenum_object_type";
15+
-- Create index "customtypeenum_object_type" to table: "custom_type_enums"
16+
CREATE INDEX "customtypeenum_object_type" ON "custom_type_enums" ("object_type") WHERE (deleted_at IS NULL);
17+
-- Create index "customtypeenum_name_field" to table: "custom_type_enums"
18+
CREATE INDEX "customtypeenum_name_field" ON "custom_type_enums" ("name", "field") WHERE (deleted_at IS NULL);
19+
-- Modify "entities" table
20+
ALTER TABLE "entities" ALTER COLUMN "tier" SET DEFAULT 'STANDARD';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Modify "entity_history" table
2+
ALTER TABLE "entity_history" ALTER COLUMN "tier" SET DEFAULT 'STANDARD';

db/migrations/atlas.sum

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
h1:yPrRgEc088xMs8tKVmLWBu5JySAPEvuo4WPHbPTiH7U=
1+
h1:3eWRpqaDab5ahUFqxvVT+SmGI2vtlEniTuf2PF4WUKI=
22
20251229183159_init.sql h1:3uf/ftr28zW8YUD9qAaY2GESQHC7pYmkhlI6oDWUCKU=
33
20251229183201_init_history.sql h1:1tFSeCDWvZgb2Ctw80C/s3tqVPNLADQw9fSDACzL8WA=
44
20251231045221_workflow.sql h1:5bLq4cHh2kxUV7xajK5bq5McKKpr88HmufYauTdsgUw=
@@ -111,3 +111,5 @@ h1:yPrRgEc088xMs8tKVmLWBu5JySAPEvuo4WPHbPTiH7U=
111111
20260414152900_nonuniqueuuid.sql h1:YXD/kcWFbLsrcdrJq17Bf8I+BU0sbMMjgjNbtB7Uouk=
112112
20260415112222_evidence_review.sql h1:VuI9hxlbN7U0hFIoc9k76jIN+KHBS7eIB2eYelx/RUM=
113113
20260415112236_evidence_review_history.sql h1:5J5MNnvzhKVCIrybURqftnx9F5Esndi6A71ZPwocoUg=
114+
20260416163442_index_update.sql h1:g/520tENIvsf3o4Hdb++FO2qZJ8m+rJpW33mWm6K5jk=
115+
20260416163445_index_update_history.sql h1:gwBbHRnaG4f4z784vVKYK7RfWyS6H2yIq2Ol+8l7YoA=

0 commit comments

Comments
 (0)