Skip to content

Commit d49bb50

Browse files
committed
rework actions table
1 parent 1303676 commit d49bb50

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

glued/Config/Pgsql/20240331205651_actions.sql

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,18 @@ CREATE TABLE glued.if__actions (
88
updated_at timestamp with time zone default CURRENT_TIMESTAMP,
99
svc_name text generated always as (doc->>'service.name') stored,
1010
svc_version text generated always as (doc->>'service.version') stored,
11-
svc_version text generated always as (doc->>'service.version') stored,
12-
13-
us_version varchar(255),
14-
us_method varchar(255),
15-
deployment_uuid uuid NOT NULL,
16-
props jsonb NULL,
17-
nonce bytea GENERATED ALWAYS AS ( decode( md5( (deployment_uuid || us_version || us_method || props )::text ), 'hex')) STORED,
11+
svc_method text generated always as (doc->>'service.method') stored,
12+
svc_deployment uuid generated always as (((doc ->> 'service.deployment'::text))::uuid) stored not null,
1813
PRIMARY KEY (uuid),
1914
UNIQUE (nonce),
20-
FOREIGN KEY (deployment_uuid) REFERENCES glued.if__deployments(uuid)
15+
FOREIGN KEY (svc_deployment) REFERENCES glued.if__deployments(uuid)
2116
);
2217

2318
COMMENT ON TABLE glued.if__actions IS 'IF service actions are service methods available in an deployment configuration/authorization context.';
24-
COMMENT ON COLUMN glued.if__actions.us_name IS 'IF microservice name (i.e. gov_ares_cz)';
25-
COMMENT ON COLUMN glued.if__actions.us_version IS 'IF microservice version (i.e. v1)';
26-
COMMENT ON COLUMN glued.if__actions.us_method IS 'IF microservice method (i.e. search)';
27-
COMMENT ON COLUMN glued.if__actions.deployment_uuid IS 'IF Deployment reference, a.k.a. the configuration/authorization context to a microservice';
19+
COMMENT ON COLUMN glued.if__actions.svc_name IS 'IF microservice name (i.e. gov_ares_cz)';
20+
COMMENT ON COLUMN glued.if__actions.svc_version IS 'IF microservice version (i.e. v1)';
21+
COMMENT ON COLUMN glued.if__actions.svc_method IS 'IF microservice method (i.e. search)';
22+
COMMENT ON COLUMN glued.if__actions.svc_deployment IS 'IF Deployment reference, a.k.a. the configuration/authorization context to a microservice';
2823

2924
-- migrate:down
3025

0 commit comments

Comments
 (0)