Skip to content
Julian Knoche edited this page Feb 10, 2020 · 12 revisions

Users table

column name data type details
id integer not null, primary key
email string not null, unique
first_name string not null
last_name string not null
balance float not null, default: 0
password_digest string not null
session_token string not null
created_at datetime not null
update_at datetime not null

Stocks table

column name data type details
id integer not null, primary key
tracker string not null, unique
exchange string not null, unique
company_name string not null
created_at datetime not null
update_at datetime not null

Watchlist table

column name data type details
user_id integer not null, primary key
stock_id integer not null, indexed
created_at datetime not null
update_at datetime not null

Transactions Table

column name data type details
id integer not null, primary key
price float not null
asset_id string not null, indexed
user_id integer not null, indexed
units integer not null
created_at datetime not null
update_at datetime not null

Clone this wiki locally