diff options
author | 2021-03-07 00:59:41 +0200 | |
---|---|---|
committer | 2021-03-07 00:59:41 +0200 | |
commit | 4f9c088f6b0458eb0ebb52ef899cdfdc57f2c43c (patch) | |
tree | f1141fc618584ca9af31ef5e5ff50d6a8ef829b7 /postgres | |
parent | Update Dockerfile (diff) |
Add route to get a member's data for helper review
Added route for getting a user's join date, total messages, and top 3 channels by activity.
This information will be used to auto-review nominees.
Diffstat (limited to 'postgres')
-rw-r--r-- | postgres/init.sql | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/postgres/init.sql b/postgres/init.sql index 740063e7..ae86fca0 100644 --- a/postgres/init.sql +++ b/postgres/init.sql @@ -13,12 +13,28 @@ INSERT INTO users VALUES ( current_timestamp ); +CREATE TABLE channels ( + id varchar, + name varchar, + primary key(id) +); + +INSERT INTO channels VALUES( + '267659945086812160', + 'python-general' +); + +INSERT INTO channels VALUES( + '1234', + 'zebra' +); + CREATE TABLE messages ( id varchar, author_id varchar references users(id), is_deleted boolean, created_at timestamp, - channel_id varchar, + channel_id varchar references channels(id), primary key(id) ); |