Skip to content
This repository was archived by the owner on Aug 6, 2022. It is now read-only.

IV. Database schema

Andrey Bogdanov edited this page Mar 2, 2016 · 26 revisions

Schema

postCounters

Post counters for each board.

Type: hash.

Key: board name.

Value: last post number on the board.

threads:<boardName>

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:

  • archived Determines if the thread is archived. Must be false.
  • boardName The thread's board name.
  • closed Determines if the thread is closed. Possible values: true/false.
  • createdAt Thread creation date and time in ISO format.
  • fixed Determines if the thread is fixed. Possible values: true/false.
  • number The number of the thread.
  • user Thread author information. An object.
  • hashpass User hashpass (hex representation of a SHA-1 hash). May be null.
  • ip IP-address of the user in normalized IPv6 form.
  • level User access level. "SUPERUSER", "ADMIN", "MODER", "USER", or null.
  • password Hashed (SHA-1) user password. May be null.
  • unbumpable Determines if the thread is unbumpable. Possible values: true/false`.
archivedThreads:<boardName>

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:

  • archived Determines if the thread is archived. Must be true.
  • boardName The thread's board name.
  • closed Determines if the thread is closed. Possible values: true/false.
  • createdAt Thread creation date and time in ISO format.
  • fixed Determines if the thread is fixed. Possible values: true/false.
  • number The number of the thread.
  • user Thread author information. An object.
  • hashpass User hashpass (hex representation of a SHA-1 hash). May be null.
  • ip IP-address of the user in normalized IPv6 form.
  • level User access level. "SUPERUSER", "ADMIN", "MODER", "USER", or null.
  • password Hashed (SHA-1) user password. May be null.
  • unbumpable Determines if the thread is unbumpable. Possible values: true/false`.
threadUpdateTimes:<boardName>

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.

threadPostNumbers:<boardName>:<threadNumber>

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.

threadsPlannedForDeletion

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>).

posts

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:

  • boardName The post's board name.
  • createdAt Post creation date and time in ISO format.
  • email Post author email. A string or null.
  • geolocation Post author geolocation data. An object.
  • cityName Identified city name. May be null.
  • countryCode Identified country code. May be null.
  • countryName Identified country name. May be null.
  • markup An Array of markup modes applied to the post text. May contain "EXTENDED_WAKABA_MARK" and/or "BB_CODE".
  • name Post author name. A string or null.
  • number The number of the post.
  • options Post options. An object.
  • showTripcode Determines if a tripcode is to be shown for the post. May be true or false.
  • signAsOp Determines whether the post is marked to have the "OP" sign. May be true or false.
  • rawText Raw post text. A string or null.
  • subject Post subject. A string or null.
  • text Marked up post text. A string or null.
  • threadNumber The number of the thread this post belongs to.
  • updatedAt Last post update date and time in ISO format. May be null if the post was never updated.
  • user Post author information. An object.
  • hashpass User hashpass (hex representation of a SHA-1 hash). May be null.
  • ip IP-address of the user in normalized IPv6 form.
  • level User access level. "SUPERUSER", "ADMIN", "MODER", "USER", or null.
  • password Hashed (SHA-1) user password. May be null.
  • bannedFor Determines whether the post author was banned for this post. May be true or false.
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``
``

Note: See also Redis data types documentation.

Clone this wiki locally