-
Notifications
You must be signed in to change notification settings - Fork 10
Database Schema
BR1K edited this page Jul 16, 2018
·
14 revisions
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
first_name | string | not null |
last_name | string | not null |
string | not null, unique | |
password_digest | string | not null, unique |
session_token | string | not null, unique |
created_at | date | not null |
updated_at | date | not null |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
symbol | string | not null |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
stock_id | integer | not null, foreign key |
user_id | integer | not null, foreign key |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
stock_id | integer | not null, foreign key |
portfolio_id | integer | not null, foreign key |
num_shares | integer | not null |
price | integer | not null |
type | string | not null |
created_at | date | not null |
updated_at | date | not null |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
user_id | integer | not null, foreign key |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
company_id | integer | foreign key |
stock_id | integer | foreign key |
title | string | not null |
body | string | not null |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
company_id | integer | foreign key |
stock_id | integer | foreign key |
user_id | integer | foreign key, not null |
title | string | not null |
body | string | not null |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
name | string | not null |
CEO | string | not null |
market_cap | float | |
industry | string | |
description | string |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
company_id | integer | not null, foreign key |
user_id | integer | not null, foreign key |
price | float | not null |
day_high | float | not null |
day_low | float | not null |
52wk_high | float | not null |
52wk_low | float | not null |
volume | integer | |
avg_volume | integer |
Column Name | Data Type | Detail |
---|---|---|
id | integer | not null, primary key |
stock_id | integer | not null, foreign key |
user_id | integer | not null, foreign key |