Skip to content
Anton James edited this page May 19, 2023 · 8 revisions

Postgres Database Schema

users

column name data type details
id bigint not null, primary key
username string not null, indexed, unique
email string not null, indexed, unique
password_digest string not null
session_token string not null, indexed, unique
created_at datetime not null
updated_at datetime not null
  • index on username, unique: true
  • index on email, unique: true
  • index on session_token, unique: true
  • has_many :games
  • has_many :reviews

Clone this wiki locally