Schema - RawBData/Checkoff GitHub Wiki

Database Schema

users

column name data type details
id integer not null, primary key
username string not null, indexed, unique
email string not null, indexed, unique
Facebook string
Gmail string
password_digest string not null
session_token string not null, indexed, unique
created_at datetime not null
updated_at datetime not null

lists

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

tasks

column name data type details
id integer not null, primary key
title string not null, indexed
notes text
start_date date
due_date date
author_id integer not null, primary key
performer_id integer
list_id integer
parent_id integer
complete boolean not null, default: false
created_at datetime not null
updated_at datetime not null
  • author_id references users id

list_tasks

column name data type details
id integer not null, primary key
task_id integer not null, indexed
list_id integer not null, indexed
created_at datetime not null
updated_at datetime not null
  • task_id references tasks id
  • list_id references lists id

tags

column name data type details
id integer not null, primary key
title string not null, indexed
created_at datetime not null
updated_at datetime not null

taggings

column name data type details
id integer not null, primary key
task_id integer not null, indexed
tag_id integer not null, indexed
created_at datetime not null
updated_at datetime not null
  • task_id references 'tasks id'
  • tag_id references 'tag id'