Skip to content
davidrichard23 edited this page Jan 22, 2019 · 4 revisions

users

column name data type details
id integer 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
balance float not null
created_at datetime not null
updated_at datetime not null

assets

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

portfolio_actions

column name data type details
id integer not null, primary key
asset_id integer not null, foreign_key
user_id integer not null, foreign_key
shares float not null
action string not null, 'buy'/'sell'
price float not null
created_at datetime not null
updated_at datetime not null

watched_assets

column name data type details
id integer not null, primary key
user_id integer not null, foreign_key
asset_id integer not null, foreign_key
created_at datetime not null
updated_at datetime not null

Clone this wiki locally