Skip to content
Joshua edited this page Jan 21, 2019 · 4 revisions

Database Schema

users

column name data type details
id integer not null, primary key
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 email, unique: true
  • index on session_token, unique: true

boards

column name data type details
id integer not null, primary key
title string not null
user_id integer not null, indexed
created_at datetime not null
updated_at datetime not null
  • user_id references users
  • index on user_id

lists

column name data type details
id integer not null, primary key
title string not null
board_id integer not null, indexed
previous_id integer not null
next_id integer not null
created_at datetime not null
updated_at datetime not null
  • board_id references board
  • index on board_id

cards

column name data type details
id integer not null, primary key
title string not null
description text
list_id integer not null, indexed
previous_id integer not null
next_id integer not null
due_date datetime
created_at datetime not null
updated_at datetime not null
  • list_id references list
  • index on list_id

comments

column name data type details
id integer not null, primary key
user_id integer not null, indexed
card_id integer not null, indexed
body text not null
created_at datetime not null
updated_at datetime not null
  • user_id references user
  • card_id references card
  • index on user_id
  • index on card_id

Clone this wiki locally