Skip to content

Commit 19110af

Browse files
committed
add approved_by column, fix readme
1 parent 0d2b3b7 commit 19110af

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ To initialise the database for the first time:
7777
2. Start the database by running `docker compose -f docker-compose.dev.yaml up -d`.
7878
3. Initialise the database:
7979
- Open a shell in the docker container by running `docker compose -f docker-compose.dev.yaml exec database-dev bash`.
80-
- Connect to the database by running `psql -U $POSTGRES_USER -d $POSTGRES_NAME`.
80+
- Connect to the database by running `psql -U $POSTGRES_USER -d $POSTGRES_DB`.
8181
- Run the queries in `INIT_DB` in [`backend/src/db/queries.rs`](./backend/src/db/queries.rs) to initialise the database.
8282

8383
To run the pre-initialised database:
@@ -90,7 +90,7 @@ For Production:
9090
2. Start the database by running `docker compose -f docker-compose.yaml up -d`.
9191
3. Initialise the database:
9292
- Open a shell in the docker container by running `docker compose -f docker-compose.yaml exec iqps-backend bash`.
93-
- Connect to the database by running `psql -U $POSTGRES_USER -d $POSTGRES_NAME`.
93+
- Connect to the database by running `psql -U $POSTGRES_USER -d $POSTGRES_DB`.
9494
- Run the queries in `INIT_DB` in [`backend/src/db/queries.rs`](./backend/src/db/queries.rs) to initialise the database.
9595

9696
### Authentication

backend/src/db/queries.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CREATE TABLE IF NOT EXISTS iqps (
1919
from_library BOOLEAN DEFAULT FALSE,
2020
upload_timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
2121
approve_status BOOLEAN DEFAULT FALSE,
22+
approved_by TEXT DEFAULT '',
2223
is_deleted BOOLEAN DEFAULT FALSE,
2324
fts_course_details tsvector GENERATED ALWAYS AS (to_tsvector('english', course_code || ' ' || course_name)) stored
2425
);

0 commit comments

Comments
 (0)