Database Schema - maxbildner/coinspace GitHub Wiki

Schema Diagram

Users

column name data type details
id integer null: false, primary key
first_name string null: false
last_name string null: false
state string null: false
email string null: false, indexed, unique
password_digest string null: false, indexed
session_token string null: false, indexed
cash_balance float null: false
created_at datetime null: false
updated_at datetime null: false

Note* state refers to location (ex. New York)

Wallet_Transactions

column name data type details
id integer null: false, primary key
wallet_id integer null: false, indexed
user_id integer null: false, indexed
transaction_type string null: false
quantity float null: false
price float null: false
created_at datetime null: false
updated_at datetime null: false

Wallets

column name data type details
id integer null: false, primary key
currency_symbol string null: false, indexed, foreign key
user_id integer null: false, indexed, foreign key
wallet_address string null: false
total_value float null: false
created_at datetime null: false
updated_at datetime null: false

Watchlists

column name data type details
id integer null: false, primary key
currency_id integer null: false, indexed, foreign key
user_id integer null: false, indexed, foreign key
created_at datetime null: false
updated_at datetime null: false

Currencies

column name data type details
id integer null: false, primary key
symbol string null: false, indexed
name string null: false, indexed
description string null: false
high float null: false
low float null: false
created_at datetime null: false
updated_at datetime null: false