Skip to content

Commit

Permalink
Merge pull request #388 from onc-healthit/LANTERN-729-create-script-h…
Browse files Browse the repository at this point in the history
…istory-pruning-algorithm

Lantern 729 migration script for history pruning algorithm
  • Loading branch information
vishnu-mettles authored Aug 23, 2024
2 parents 1a09b81 + 3e3723c commit ccc02bb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BEGIN;

DROP TABLE IF EXISTS info_history_pruning_metadata;

COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BEGIN;

DROP TABLE IF EXISTS info_history_pruning_metadata;

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
);

COMMIT;

0 comments on commit ccc02bb

Please sign in to comment.