Skip to content

Commit

Permalink
Sync changes from TRS DB into DQT reporting database
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Aug 14, 2024
1 parent 2aef5e5 commit 2e6879b
Show file tree
Hide file tree
Showing 16 changed files with 5,027 additions and 36 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/dbml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
POSTGRES_PASSWORD: trs
POSTGRES_DB: trs
options: >-
--name postgres
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
Expand All @@ -28,6 +29,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set postgres wal_level to logical
run: |
docker exec -i postgres bash << EOF
echo "wal_level = logical" >> /var/lib/postgresql/data/postgresql.conf
EOF
docker restart --time 0 postgres
- uses: extractions/setup-just@v2

- name: Install postgresql-client
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ jobs:

services:
postgres:
image: postgres
image: postgres:15
env:
POSTGRES_PASSWORD: trs
POSTGRES_DB: trs
options: >-
--name postgres
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
Expand All @@ -37,6 +38,14 @@ jobs:
with:
submodules: recursive

- name: Set postgres wal_level to logical
run: |
docker exec -i postgres bash << EOF
echo "wal_level = logical" >> /var/lib/postgresql/data/postgresql.conf
EOF
docker restart --time 0 postgres
- uses: extractions/setup-just@v2

- name: Install tools
Expand Down Expand Up @@ -192,11 +201,12 @@ jobs:

services:
postgres:
image: postgres
image: postgres:15
env:
POSTGRES_PASSWORD: trs
POSTGRES_DB: trs
options: >-
--name postgres
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
Expand All @@ -220,6 +230,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set postgres wal_level to logical
run: |
docker exec -i postgres bash << EOF
echo "wal_level = logical" >> /var/lib/postgresql/data/postgresql.conf
EOF
docker restart --time 0 postgres
- uses: extractions/setup-just@v2

- uses: Azure/login@v2
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ just install-tools
Install Postgres then set a connection string configuration entry in user secrets for running the apps and another for running the tests.
Note you should use a different database for tests as the test database will be cleared down whenever tests are run.

The server's `wal_level` must be set to `logical`:
```
ALTER SYSTEM SET wal_level = logical;
```
You may have to restart the server after amending this configuration.

e.g.
```shell
just set-secret ConnectionStrings:DefaultConnection "Host=localhost;Username=postgres;Password=your_postgres_password;Database=trs"
Expand Down
Loading

0 comments on commit 2e6879b

Please sign in to comment.