diff options
author | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2011-08-03 12:09:19 +0100 |
---|---|---|
committer | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2011-08-03 12:09:19 +0100 |
commit | 31067f163f175ab7073df73179315a99a7814762 (patch) | |
tree | 9eb99b738231a82ef45cca3a31100b6f84afca01 /doc/database.md | |
parent | 051589ed47968dbfbf3a1c124736556d263dde92 (diff) | |
download | etherpad-lite-31067f163f175ab7073df73179315a99a7814762.zip |
added a documentation for the database structure
Diffstat (limited to 'doc/database.md')
-rw-r--r-- | doc/database.md | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/database.md b/doc/database.md new file mode 100644 index 00000000..95718ffd --- /dev/null +++ b/doc/database.md @@ -0,0 +1,69 @@ +# Database structure + +## Used so far + +### pad:$PADID +Saves all informations about pads + +* **atext** - the latest attributed text +* **pool** - the attribute pool +* **head** - the number of the latest revision +* **chatHead** - the number of the latest chat entry + +*planed:* + +* **public** - flag that disables security for this pad +* **passwordHash** - string that contains a bcrypt hashed password for this pad + +### pad:$PADID:revs:$REVNUM +Saves a revision $REVNUM of pad $PADID + +* **meta** + * **author** - the autorID of this revision + * **timestamp** - the timestamp of when this revision was created +* **changeset** - the changeset of this revision + +### pad:$PADID:chat:$CHATNUM +Saves a chatentry with num $CHATNUM of pad $PADID + +* **text** - the text of this chat entry +* **userId** - the autorID of this chat entry +* **time** - the timestamp of this chat entry + +### pad2readonly:$PADID +Translates a padID to a readonlyID +### readonly2pad:$READONLYID +Translates a readonlyID to a padID +### token2author:$TOKENID +Translates a token to an authorID +### globalAuthor:$AUTHORID +Information about an author + +* **name** - the name of this author as shown in the pad +* **colorID** - the colorID of this author as shown in the pad + +## Planed + +### mapper2group:$MAPPER +Maps an external application identifier to an internal group +### mapper2author:$MAPPER +Maps an external application identifier to an internal author +### group:$GROUPID +a group of pads + +* **pads** - object with pad names in it, values are null +### session:$SESSIONID +a session between an author and a group + +* **groupID** - the groupID the session belongs too +* **authorID** - the authorID the session belongs too +* **validUntil** - the timestamp until this session is valid + +### author2sessions:$AUTHORID +saves the sessions of an author + +* **sessions** - object with sessionIDs in it, values are null + +### group2sessions:$GROUPID + +* **sessions** - object with sessionIDs in it, values are null |