Schema - ZackSyed/OrderedList GitHub Wiki
Database Schema
Users
column name | data type | details |
---|---|---|
id |
integer | not null, primary_key |
username |
string | not null, unique, indexed |
email |
string | not null, unique, indexed |
password_digest |
string | not null |
session_token |
string | not null |
- index on
[username], unique: true
- index on
[email], unique: true
has_many
tasks, lists, catagories.
catagories
column name | data type | details |
---|---|---|
id |
integer | not null, primary_key |
work |
boolean | default: false |
exercise |
boolean | default: false |
garden |
boolean | default: false |
groceries |
boolean | default: false |
user_id |
integer | foreign_key , not null, indexed |
user_id
referencesuser
- index on
[user_id]
List
column name | data type | details |
---|---|---|
id |
integer | not null, primary_key |
name |
string | not null, indexed |
catagory |
string | not null |
closed |
boolean | default: false |
user_id |
integer | not null, foreign_key |
- be able to map location, to keep track where each split occurred.
- index on
[name]
- index on
[longitude, latitude]
Task
column name | data type | details |
---|---|---|
id |
integer | not null, primary_key |
description |
string | not null |
user_id |
integer | not null, indexed, foreign_key |
list_id |
integer | not null, indexed, foreign_key |
complete |
boolean | default: false |
user_id
referencesuser
list_id
referenceslist
- index on
[list_id, user_id]