From b8e2e61884a1ba73d51c8f70a5030dc25ed02543 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Thu, 20 Apr 2023 18:22:23 +0300
Subject: possible db schema for community

---
 backend/database/init.sql | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

(limited to 'backend/database/init.sql')

diff --git a/backend/database/init.sql b/backend/database/init.sql
index f5d380c..1b35c02 100644
--- a/backend/database/init.sql
+++ b/backend/database/init.sql
@@ -77,4 +77,37 @@ CREATE TABLE countries (
   country_code CHAR(2),
   country_name TEXT NOT NULL,
   PRIMARY KEY (country_code)
-);
\ No newline at end of file
+);
+
+-- CREATE TABLE community_maps (
+--   id SMALLSERIAL,
+--   map_id SMALLINT NOT NULL,
+--   category TEXT NOT NULL,
+--   tutorial TEXT NOT NULL,
+--   video_link TEXT NOT NULL,
+--   PRIMARY KEY (id),
+--   FOREIGN KEY (map_id) REFERENCES maps(id)
+-- );
+
+-- TODO
+-- CREATE TABLE community_history (
+--   id SERIAL,
+--   map_id SMALLINT NOT NULL,
+--   user_id TEXT NOT NULL,
+--   score_count SMALLINT NOT NULL,
+--   created_at TIMESTAMP NOT NULL DEFAULT now(),
+--   PRIMARY KEY (id),
+--   FOREIGN KEY (user_id) REFERENCES users(steam_id),
+--   FOREIGN KEY (map_id) REFERENCES maps(id)
+-- );
+
+-- CREATE TABLE community_posts (
+--   id SERIAL,
+--   map_id SMALLINT NOT NULL,
+--   user_id TEXT NOT NULL,
+--   post TEXT NOT NULL,
+--   created_at TIMESTAMP NOT NULL DEFAULT now(),
+--   PRIMARY KEY (id),
+--   FOREIGN KEY (user_id) REFERENCES users(steam_id),
+--   FOREIGN KEY (map_id) REFERENCES maps(id)
+-- );
\ No newline at end of file
-- 
cgit v1.2.3

