From 4f256fbdde3305177aa7e5c80ea715bfd677efee Mon Sep 17 00:00:00 2001
From: M <m@lfurio.us>
Date: Fri, 20 Nov 2015 22:16:27 -0500
Subject: * Moved the `unread` value of messages out into a new table so that
 this value can now be user-specific

---
 schema.sql | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/schema.sql b/schema.sql
index 5dd4a10..2171cde 100644
--- a/schema.sql
+++ b/schema.sql
@@ -69,6 +69,14 @@ CREATE TABLE `obj_member` (
     PRIMARY KEY (`guid`,`member`)
 );
 
+/* Scheme for logging if a message has been seen by a user on a wide scale */
+DROP TABLE IF EXISTS `msg_read`;
+CREATE TABLE `msg_read` (
+    `guid`   varchar(10)          NOT NULL,
+    `user`   varchar(10)          NOT NULL,
+    PRIMARY KEY (`guid`,`user`)
+);
+
 /* User objects - special attributes */
 /* Notice: 'timeUpdated' field should be used to store the time of the start of the user's current session */
 /* Notice: 'key' field is the user's hashed and salted password -- SHA256 */
@@ -135,7 +143,6 @@ DROP TABLE IF EXISTS `message`;
 CREATE TABLE `message` (
     `guid`   varchar(10)          NOT NULL,
     `author` varchar(10)          NOT NULL,
-    `unread` int(10) unsigned     NOT NULL DEFAULT 1,
     `message` text            DEFAULT NULL,
     PRIMARY KEY (`guid`)
 );
-- 
cgit v1.2.3