From 368f6dd461d768e835124afdd5aa0228d9e0ba0b Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Thu, 4 Jul 2024 19:02:11 +0300
Subject: feat: update map tables db schema (#157)

---
 backend/database/init.sql | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

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

diff --git a/backend/database/init.sql b/backend/database/init.sql
index 1fda15d..c33821b 100644
--- a/backend/database/init.sql
+++ b/backend/database/init.sql
@@ -48,25 +48,14 @@ CREATE TABLE maps (
   FOREIGN KEY (chapter_id) REFERENCES chapters(id)
 );
 
-CREATE TABLE map_routes (
-  id SERIAL,
-  map_id SMALLINT NOT NULL,
-  category_id SMALLINT NOT NULL,
-  score_count SMALLINT NOT NULL,
-  description TEXT NOT NULL,
-  showcase TEXT NOT NULL DEFAULT,
-  PRIMARY KEY (id),
-  FOREIGN KEY (map_id) REFERENCES maps(id),
-  FOREIGN KEY (category_id) REFERENCES categories(id),
-  UNIQUE (map_id, category_id, score_count)
-);
-
 CREATE TABLE map_history (
   id SERIAL,
   map_id SMALLINT NOT NULL,
   category_id SMALLINT NOT NULL,
   user_name TEXT NOT NULL,
   score_count SMALLINT NOT NULL,
+  description TEXT NOT NULL,
+  showcase TEXT NOT NULL DEFAULT,
   record_date DATE NOT NULL,
   PRIMARY KEY (id),
   FOREIGN KEY (category_id) REFERENCES categories(id),
-- 
cgit v1.2.3

