Skip to content

Commit

Permalink
Remove pgloader, insert TCR data via Flyway migration, add migration …
Browse files Browse the repository at this point in the history
…to populate query tables (#2496)

* Support pgsql infra

* Make infra work with next

* Remove dev win

* The real dev win fix

* add bash script

* update load script to add sqlite db

* update docker compose file to include loading the data

* cleanup

* [pre-commit.ci] auto fixes from pre-commit hooks

* add chmod cmd

* [pre-commit.ci] auto fixes from pre-commit hooks

* typo

* remove temp code

* add query_name to schema

* add oid as a column for query-to_valueset

* remove pgloader bash script from docker compose

* add migration 2 to load TCR data

* add migration 3 to populate data for query tables

* remove load tcr from docker compose

* [pre-commit.ci] auto fixes from pre-commit hooks

* remove loading script

---------

Co-authored-by: bamader <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 6, 2024
1 parent 399e001 commit 7c391fc
Show file tree
Hide file tree
Showing 5 changed files with 175,384 additions and 51 deletions.
10 changes: 0 additions & 10 deletions containers/tefca-viewer/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,3 @@ services:
interval: 2s
timeout: 5s
retries: 20
load_tcr_data:
image: "postgres:alpine"
depends_on:
db:
condition: service_healthy
volumes:
- "./tefca.env:/tefca.env"
- "./load_tcr_data.sh:/load_tcr_data.sh"
entrypoint:
["/bin/sh", "-c", "chmod +x /load_tcr_data.sh && /load_tcr_data.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ CREATE TABLE IF NOT EXISTS icd_crosswalk (

CREATE TABLE IF NOT EXISTS query (
id UUID DEFAULT uuid_generate_v4 (),
query_name VARCHAR(255),
author VARCHAR(255),
date_created TIMESTAMP,
date_last_modified TIMESTAMP,
Expand All @@ -63,6 +64,7 @@ CREATE TABLE IF NOT EXISTS query_to_valueset (
id TEXT PRIMARY KEY,
query_id UUID,
valueset_id TEXT,
valueset_oid TEXT,
FOREIGN KEY (query_id) REFERENCES query(id),
FOREIGN KEY (valueset_id) REFERENCES valuesets(id)
);
Expand Down
Loading

0 comments on commit 7c391fc

Please sign in to comment.