Skip to content
Rick Zhang edited this page Aug 11, 2020 · 1 revision

Data Model

The database schema is actually quite obtuse, with plenty of deprecated functionality. But then again, this is true for most production systems in the world, so don't worry too much about it. You can read the schema in /db/schema.rb, which is a generated file (aka do not edit manually). Instead, if you need to make a schema change, use Rails migrations.

Hosting

Our database is a Postgres instance hosted on AWS RDS (Relational Database Service). There are good reasons that we do not simply create a separate Docker container and handle it ourselves. Those good reasons are:

  1. We don't want to wipe all the data by accident with a bad config.
  2. The lifecycle of the database should not be tied to the lifecycle of the application server. Very infrequently do we ever need to touch anything related to the database on AWS.

Making Yourself an Admin

Note: you need to have completed the first-time setup routine.

rails console
u = User.find_by(email: [your email])
u.user_type = 5
u.save

Congrats, you will now see the Statistics and Admin tabs.

Clone this wiki locally