From fbb58c515142d55de72ae61b504596bea97d0f67 Mon Sep 17 00:00:00 2001
From: M <m@lfurio.us>
Date: Thu, 19 Nov 2015 22:33:02 -0500
Subject: * Data schema errata

---
 schema.sql | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 2863cbc..589fafb 100644
--- a/schema.sql
+++ b/schema.sql
@@ -42,6 +42,8 @@ CREATE TABLE `object` (
     `owner`  varchar(10)          NOT NULL,
     `parent` varchar(10)      DEFAULT NULL,
     `name`   varchar(50)          NOT NULL,
+    `timeCreated` datetime        NOT NULL,
+    `timeUpdated` datetime        NOT NULL,
     `type`   enum(
         'user',
         'group',
@@ -61,12 +63,17 @@ CREATE TABLE `obj_member` (
 );
 
 /* 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 */
+/* Notice: 'salt' is a random SHA256 output, used as salt for user's password */
 DROP TABLE IF EXISTS `user`;
 CREATE TABLE `user` (
     `guid`   varchar(10)          NOT NULL,
     `key`    varchar(64)          NOT NULL,
     `salt`   varchar(64)          NOT NULL,
     `alias`  varchar(50)      DEFAULT NULL,
+    `email`  varchar(50)      DEFAULT NULL,
+    `emailConf` int(10) unsigned  NOT NULL DEFAULT 0,
     PRIMARY KEY (`guid`)
 );
 
-- 
cgit v1.2.3

