-
Notifications
You must be signed in to change notification settings - Fork 4
IV. Database schema
- postCounters
- threads:boardName
- archivedThreads:boardName
- threadUpdateTimes:boardName
- threadPostNumbers:boardName:threadNumber
- threadsPlannedForDeletion
- posts
- referencedPosts:boardName:postNumber
- referringPosts:boardName:postNumber
- postFileInfoNames:boardName:postNumber
- postExtraData
- fileInfos
- fileHashes:hash
- voteUsers:postNumber
- voteVariantUsers:postNumber:ID
- postsPlannedForDeletion
- captchaQuotas
- registeredUserLevels:hash
- registeredUserHashes
- registeredUserIps:hash
- superuserHashes
- userPostNumbers:IP:boardName
- bannedUserIps
- userBans:IP:boardName
- userBanPostNumbers
- chats:hash
- chat:boardName:postNumber
- chatMembers:boardName:postNumber
- synchronizationData:key
- deletedThreads
Note: See also Redis data types documentation.
Post counters for each board.
Type: hash.
Key: board name.
Value: last post number on the board.
Thread information for each thread on each board.
Type: multiple hashes. <boardName> is the additional part of the key.
Key: thread number.
Value: Stringified JSON. Fields:
-
archivedDetermines if the thread is archived. Must befalse. -
boardNameThe thread's board name. -
closedDetermines if the thread is closed. Possible values:true/false. -
createdAtThread creation date and time in ISO format. -
fixedDetermines if the thread is fixed. Possible values:true/false. -
numberThe number of the thread. -
userThread author information. Anobject.
-
hashpassUser hashpass (hex representation of a SHA-1 hash). May benull. -
ipIP-address of the user in normalized IPv6 form. -
levelUser access level."SUPERUSER","ADMIN","MODER","USER", ornull. -
passwordHashed (SHA-1) user password. May benull.
-
unbumpable Determines if the thread is unbumpable. Possible values:true/false`.
Archived thread information for each archived thread on each board.
Type: multiple hashes. <boardName> is the additional part of the key.
Key: thread number.
Value: Stringified JSON. Fields:
-
archivedDetermines if the thread is archived. Must betrue. -
boardNameThe thread's board name. -
closedDetermines if the thread is closed. Possible values:true/false. -
createdAtThread creation date and time in ISO format. -
fixedDetermines if the thread is fixed. Possible values:true/false. -
numberThe number of the thread. -
userThread author information. Anobject.
-
hashpassUser hashpass (hex representation of a SHA-1 hash). May benull. -
ipIP-address of the user in normalized IPv6 form. -
levelUser access level."SUPERUSER","ADMIN","MODER","USER", ornull. -
passwordHashed (SHA-1) user password. May benull.
-
unbumpable Determines if the thread is unbumpable. Possible values:true/false`.
Last thread update time for each thread (both archived and not archived) on each board. Hint: A thread is updated on new post if it has not reached the bump limit.
Type: multiple hashes. <boardName> is the additional part of the key.
Key: thread number.
Value: Thread last update date and time in ISO format.
A list of post numbers for each thread (both archived and not archived) on each board.
Type: multiple unordered sets. <boardName> and <threadNumber> are the additional parts of the key.
Values: Numbers of the posts in the thread.
A list of threads planned for deletion on each board. Note: Used for debug and error recovery if thread deletion fails.
Type: Unordered set.
Values: A combination of thread board name and number separated by a semicolon (<boardName>:<threadNumber>).
Post map for each thread (both archived and not archived) on each board.
Type: Hash.
Key: A combination of post board name and number separated by a semicolon (<boardName>:<postNumber>).
Value: Stringified JSON. Fields:
-
boardNameThe post's board name. -
createdAtPost creation date and time in ISO format. -
emailPost author email. Astringornull. -
geolocationPost author geolocation data. Anobject.
-
cityNameIdentified city name. May benull. -
countryCodeIdentified country code. May benull. -
countryNameIdentified country name. May benull.
-
markupAnArrayof markup modes applied to the post text. May contain"EXTENDED_WAKABA_MARK"and/or"BB_CODE". -
namePost author name. Astringornull. -
numberThe number of the post. -
optionsPost options. Anobject.
-
showTripcodeDetermines if a tripcode is to be shown for the post. May betrueorfalse. -
signAsOpDetermines whether the post is marked to have the "OP" sign. May betrueorfalse.
-
rawTextRaw post text. Astringornull. -
subjectPost subject. Astringornull. -
textMarked up post text. Astringornull. -
threadNumberThe number of the thread this post belongs to. -
updatedAtLast post update date and time in ISO format. May benullif the post was never updated. -
userPost author information. Anobject.
-
hashpassUser hashpass (hex representation of a SHA-1 hash). May benull. -
ipIP-address of the user in normalized IPv6 form. -
levelUser access level."SUPERUSER","ADMIN","MODER","USER", ornull. -
passwordHashed (SHA-1) user password. May benull.
-
bannedForDetermines whether the post author was banned for this post. May betrueorfalse.
A map of posts referenced by this post for each post (both archived and not archived) on each board.
Type: multiple hashes. <boardName> and <threadNumber> are the additional parts of the key.
Key: A combination of the referenced post board name and number separated by a semicolon (<boardName>:<postNumber>).
Value: Stringified JSON. Fields:
-
boardNameThe post's board name. -
postNumberThe number of the post. -
threadNumberThe number of the thread this post belongs to. -
createdAtPost creation date and time in ISO format.
A map of posts referring to this post for each post (both archived and not archived) on each board.
Type: multiple hashes. <boardName> and <threadNumber> are the additional parts of the key.
Key: A combination of the referring post board name and number separated by a semicolon (<boardName>:<postNumber>).
Value: Stringified JSON. Fields:
-
boardNameThe post's board name. -
postNumberThe number of the post. -
threadNumberThe number of the thread this post belongs to.
A list of files attached to this post each post (both archived and not archived) on each board.
Type: multiple unordered sets. <boardName> and <threadNumber> are the additional parts of the key.
Values: Names of the files.
Extra data for each post (both archived and not archived) on each board.
Type: Hash.
Key: A combination of post board name and number separated by a semicolon (<boardName>:<postNumber>).
Value: Depends on the post board. May be null, string, number, or a stringified object.
Information about each file attached to each post.
Type: Hash.
Key: File name.
Value: Stringified JSON. Fields:
-
boardNameThe name of the board of the post this file is attached to. -
dimensionsFile dimensions information. Anobjectornull.
-
heightThe height of the file. -
widthThe width of the file.
-
extraDataExtra data. Depends on the file type. May be anobjectornull. -
hashHexadecimal representation of the file SHA-1 hash. -
mimeTypeMIME-type of the file. -
nameTHe name of the file. -
postNumberThe number of the post this file is attached to. -
ratingThe content rating. May be"SFW","R-15","R-18", or"R-18G". -
sizeThe size of the file (in bytes). -
thumbFile thumbnail information. Anobject.
-
dimensionsFile thumb dimensions information. Anobject.
-
heightThe height of the file thumb. -
widthThe width of the file thumb.
-
nameThe name of the file thumb.
A list of brief file information objects for each files with the same hash on each board.
Type: Multiple unordered sets. <hash> is the additional part of the key.
Values: Stringified JSON. Fields:
-
nameThe name of the file. -
thumbFile thumbnail information. Anobject.
-
nameThe name of the file thumb.
-
sizeThe size of the file (in bytes). -
boardNameThe name of the board of the post this file is attached to. -
mimeTypeMIME-type of the file. -
ratingThe content rating. May be"SFW","R-15","R-18", or"R-18G".
A list of IP addresses of the users who voted in the voting attached to the post on the /rpg/ board.
Type: multiple unordered sets. <postNumber> is the additional part of the key.
Values: IP addresses in the normalized IPv6 form.
A list of IP addresses of the users who voted for the specific variant in the voting attached to the post on the /rpg/ board.
Type: multiple unordered sets. <postNumber> and <ID> are the additional parts of the key.
Values: IP addresses in the normalized IPv6 form.
A list of posts planned for deletion on each board. Note: Used for debug and error recovery if post deletion fails.
Type: Unordered set.
Values: A combination of post board name and number separated by a semicolon (<boardName>:<postNumber>).
Captcha quota for each user on each board.
Type: Hash.
Key: A combination of board name and user IP address in IPv6 form separated by a semicolon (<boardName>:<IP>).
Value: The quota (an integer number greater or equal to zero).
Registered user levels for each user on each board.
Type: multiple hashes. <hash> is the additional part of the key.
Key: Board name.
Value: User access level. Either "ADMIN", "MODER", or "USER".
Registered user hashes for each user IP address.
Type: Hash.
Key: User IP address in IPv6 normalized form.
Value: User hashpass (a hexadecimal representation of a SHA-1 hash).
A list of registered user IP addresses for each registered user.
Type: multiple unorderes sets. <hash> is the additional part of the key.
Values: User IP addresses in IPv6 normalized form.
Superuser hashes.
Type: Unordered set.
Values: User hashpasses (hexadecimal representations of SHA-1 hashes).
A list of post numbers for each user IP address on each board.
Type: multiple unordered sets. <IP> and <boardName> are the additional parts of the key.
Key: Post numbers.
A list of IP addresses of the banned users.
Type: Unordered set.
Values: Banned user IP addresses in IPv6 normalized form.
Ban level information for each banned user on each board.
Type: A single value. <IP> and <boardName> are the additional parts of the key.
Value: Stringified JSON. Fields:
-
boardNameThe name of the board of the post for which the ban was assigned. May benull. -
expiresAtThe date and time when the ban expires in ISO format, ornull(if the ban never expires). -
levelThe ban level. Either"READ_ONLY", or"NO_ACCESS". -
reasonThe reason for which the ban was assigned. -
postNumberThe number of the post for which the ban was assigned. Either an integernumbergreater than zeor, ornull. -
createdAtBan creation date and time in ISO format.
Banned user post number related to each ban.
Type: Hash.
Key: a key used for [userBans:IP:boardName](IV. Database schema#userbansipboardname).
Value: Post number (a Number).
A list of chats for each user.
Type: multiple unordered sets. <hash> is the additional part of the key.
Values: A combination of post board name and number separated by a semicolon (<boardName>:<postNumber>).
A list of messages in each chat.
Type: multiple ordered sets. <boardName> and <postNumber> are the additional parts of the key.
Values: Stringified JSONs. Fields:
-
textThe text of the message. -
dateThe date and time the message was sent in ISO format. -
senderHashHash of the sender (either hashpass, or a SHA-1 hash of the IP address). -
receiverHashHash of the receiver (either hashpass, or a SHA-1 hash of the IP address).
A list of members of each chat.
Type: multiple sets. <boardName> and <postNumber> are the additional parts of the key.
Values: Stringified JSONs. Fields:
-
ipIP address of the member. -
hashpassHashpass of the member. -
hashHash of the member (either hashpass, or a SHA-1 hash of the IP address).
A list of synchronization data.
Type: multiple unordered sets. <key> is the additional part of the key.
Values: Stringified JSONs (user local settings synchronization data).
A list of all threads deleted while the application was running. Cleared on every application launch.
Type: Unordered set.
Values: A combination of thread board name and number separated by a semicolon (<boardName>:<threadNumber>).