Skip to content

Commit

Permalink
rework actions table
Browse files Browse the repository at this point in the history
  • Loading branch information
killua-eu committed May 19, 2024
1 parent 1303676 commit d49bb50
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions glued/Config/Pgsql/20240331205651_actions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,18 @@ CREATE TABLE glued.if__actions (
updated_at timestamp with time zone default CURRENT_TIMESTAMP,
svc_name text generated always as (doc->>'service.name') stored,
svc_version text generated always as (doc->>'service.version') stored,
svc_version text generated always as (doc->>'service.version') stored,

us_version varchar(255),
us_method varchar(255),
deployment_uuid uuid NOT NULL,
props jsonb NULL,
nonce bytea GENERATED ALWAYS AS ( decode( md5( (deployment_uuid || us_version || us_method || props )::text ), 'hex')) STORED,
svc_method text generated always as (doc->>'service.method') stored,
svc_deployment uuid generated always as (((doc ->> 'service.deployment'::text))::uuid) stored not null,
PRIMARY KEY (uuid),
UNIQUE (nonce),
FOREIGN KEY (deployment_uuid) REFERENCES glued.if__deployments(uuid)
FOREIGN KEY (svc_deployment) REFERENCES glued.if__deployments(uuid)
);

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

-- migrate:down

Expand Down

0 comments on commit d49bb50

Please # to comment.