summaryrefslogtreecommitdiffstats
path: root/schema.sql
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-01-30 18:12:25 -0500
committerMalf Furious <m@lfurio.us>2016-01-30 18:12:25 -0500
commit86d179fbb5ece5d69184ecd885a2b29818e9a57e (patch)
treee93249bc949acc14dee3b11ce74af3763752d416 /schema.sql
parent3a111ed74e89e9634e5baf4375625acc6ad262e6 (diff)
downloadscrott-86d179fbb5ece5d69184ecd885a2b29818e9a57e.tar.gz
scrott-86d179fbb5ece5d69184ecd885a2b29818e9a57e.zip
Modify database schema and semantics for user objects
When user objects are initially created they need to hold a NULL owner value (since users are self-owning objects and prior to db insertion their own guid is not known). Also, the timeUpdated field will no longer hold special meaning for user objects and is now going to be treated as consistent with the rest of the data model.
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql3
1 files changed, 1 insertions, 2 deletions
diff --git a/schema.sql b/schema.sql
index 44655b7..8902fbf 100644
--- a/schema.sql
+++ b/schema.sql
@@ -47,7 +47,7 @@ DROP TABLE IF EXISTS `object`;
CREATE TABLE `object` (
`guid` varchar(10) NOT NULL,
`perms` int(10) unsigned NOT NULL DEFAULT 0,
- `owner` varchar(10) NOT NULL,
+ `owner` varchar(10) DEFAULT NULL,
`parent` varchar(10) DEFAULT NULL,
`name` varchar(50) NOT NULL,
`timeCreated` datetime NOT NULL,
@@ -86,7 +86,6 @@ CREATE TABLE `msg_read` (
);
/* 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`;