Skip to content

Database Schema

Josh Earlenbaugh edited this page Nov 19, 2017 · 8 revisions

The database schema for Agora is structured as follows (I do not list updated-at or created-at columns here, but each table have these columns in implementation):

  • users

    • id: integer
    • username: string
    • password_digest: string
    • session_token: string
  • questions

    • id: integer
    • user_id: integer
    • title: string
    • body: text
  • answers

    • id: integer
    • user_id: integer
    • question_id: integer
    • title: string
    • body: text
  • comments

    • id: integer
    • user_id: integer
    • answer_id: integer
    • title: string
    • body: text

Back to Table of Contents...

Clone this wiki locally