From 4f9c088f6b0458eb0ebb52ef899cdfdc57f2c43c Mon Sep 17 00:00:00 2001
From: Boris Muratov <8bee278@gmail.com>
Date: Sun, 7 Mar 2021 00:59:41 +0200
Subject: 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.
---
 postgres/init.sql | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

(limited to 'postgres/init.sql')

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)
 );
 
-- 
cgit v1.2.3

