Skip to content

Commit

Permalink
Added CREATE script for the info_history_pruning_metadata table
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-salunkhe-mettle committed Aug 13, 2024
1 parent 48ccce7 commit 24e0ed6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions db/sql/dbsetup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,16 @@ CREATE TABLE validations (
validation_result_id INT REFERENCES validation_results(id) ON DELETE SET NULL
);

CREATE TABLE info_history_pruning_metadata (
id SERIAL PRIMARY KEY,
started_on timestamp with time zone NOT NULL DEFAULT now(),
ended_on timestamp with time zone,
successful boolean NOT NULL DEFAULT false,
num_rows_processed integer NOT NULL DEFAULT 0,
num_rows_pruned integer NOT NULL DEFAULT 0,
query_int_start_date timestamp with time zone NOT NULL,
query_int_end_date timestamp with time zone NOT NULL
);

CREATE TRIGGER set_timestamp_fhir_endpoints
BEFORE UPDATE ON fhir_endpoints
Expand Down

0 comments on commit 24e0ed6

Please sign in to comment.