Skip to content

Database schema

edbaeza edited this page Apr 19, 2020 · 8 revisions

personalBoards

personalBoards/<userid>/pboards/<boardid>

  • articles: array of reference objects to local articles
  • boardName: str
  • followers: array of references to users/<userid>
  • isPrivate: bool
  • queue: array of references to articles (MIGHT HAVE WRONG DATA RIGHT NOW)
  • timestamp: timestamp (when created. note: this does not exist in old boards, but new boards will have it, except those created by chrome extension)
  • imageURL: str

Tentative:

  • lastUpdatedTime (timestamp)
  • photoUrl: string (but url)

localArticles

localArticles/users/<userid>/<articleid>

  • name: str
  • notes: str
  • read: bool
  • starred: bool
  • time: timestamp (this is creation time)
  • url: str (but url)
  • user_reports: array of
    • user: ref to user at users/<userid>/
    • report: str

Tentative:

  • lastUpdatedTime (timestamp)

users

users/<userid>/

  • email: str
  • blocked_users: array of references to /users/<userid> (MIGHT NOT BE PRESENT IN ALL RIGHT NOW, GENERATED WHEN BLOCKING SOMEONE)
  • articles_raised_eyebrow: array of references to community articles /communityArticles/<community_article_id>
  • followers: array of userids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
  • following: array of userids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
  • pboardFollowing: array of personal board ids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
  • photoUrl: str (but url)
  • platform: str (Google/FB/etc.)

Note: might change the ids fields to store references instead, but can currently code based on how they are stored currently.

communityArticles

communityArticles/<article id>

  • name: str
  • eyebrow: number (integer "like" count) (ONLY EXISTS IN SOME, USE users_eyebrows INSTEAD WHICH IS AN ARRAY)
  • comments: array of
    • user: references to users at /users/<userid>
    • comment_str: str
  • communities: array of references to community boards at /communityBoards/<community board id> (note: this might be empty for some articles, but it will still be defined)
  • notes: str (notes for this article)
  • time: timestamp (time of creation of this article. NOT THE LAST UPDATED TIME)
  • url: str (but url)
  • user: ref to user at /users/<userid>
  • user_reports: (same as in local articles)
  • users_eyebrows: array of userids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)

Note: might change only id fields to store refs Note: users_eyebrows is correct name, NOT user_eyebrows

communityBoards

communityBoards/<boardid>

  • articles: arr of refs to community articles
  • isPrivate: bool (IMPORTANT: DON'T KNOW WHY THIS FIELD IS THERE, DON'T USE IT)
  • name: str

Clone this wiki locally