-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
mayagbarnes edited this page Mar 30, 2021
·
10 revisions
| 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 |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
username, unique: true - index on
email, unique: true - index on
session_token, unique: true
| column_name | data_type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null, indexed, unique |
institution |
string | not null, indexed |
category |
string | not null, indexed |
balance |
decimal | not null |
user_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
name, unique: true - index on
institution - index on
category -
user_idreferencesusers - index on
user_id
| column_name | data_type | details |
|---|---|---|
id |
integer | not null, primary key |
description |
string | not null, indexed |
category |
string | not null, indexed |
amount |
decimal | not null |
date |
date | not null |
account_id |
integer | not null, indexed, foreign key |
- index on
description - index on
category -
account_idreferencesaccounts - index on
account_id
| column_name | data_type | details |
|---|---|---|
id |
integer | not null, primary key |
name |
string | not null, indexed |
price |
decimal | not null |
shares |
integer | not null |
price_paid |
decimal | not null |
market_value |
decimal | not null |
change |
decimal | not null |
account_id |
integer | not null, indexed, foreign key |
- index on
name -
account_idreferencesaccounts - index on
account_id