Skip to content
mayagbarnes edited this page Apr 15, 2021 · 10 revisions

Mintee Schema

users

column_name data_type details
id integer not null, primary key
username 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 session_token, unique: true

accounts

column_name data_type details
id integer not null, primary key
account_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
  • index on user_id
  • user_id references users

transactions

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
  • index on account_id
  • account_id references accounts

investments

column_name data_type details
id integer not null, primary key
name string not null, indexed
ticker string not null, indexed
shares integer not null
price_paid decimal not null
account_id integer not null, indexed, foreign key
  • index on name
  • index on account_id
  • account_id references accounts
  • index on ticker

Clone this wiki locally