-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Luke Ludwig edited this page Aug 25, 2014
·
2 revisions
- users
- hashed_password
- salt
- activated
- created_at
- updated_at
- other devise related columns?
- trips
- user_id
- name - string
- start_date
- description - string
- location - string
- temp_range - string
- weight_unit - string/enum - values - (ounces, grams, possibly more?)
- items
- user_id
- category_id
- brand_id
- name - string
- ounces - decimal (precision 6 and scale of 2 should allow up to a max of 9999 ounces (625 pounds) and the ability to set the weight to 2 decimal spots such as 3.75 ounces). Also, calling this out as ounces instead of weight specifically. We will want to allow one to track weight as grams or ounces, but it is simplest to always store the weight as one of these and convert back and forth as needed outside of the data layer.
- consumable - boolean (consumables should not be included in the base weight of pack)
- notes - string
- item_trips
- item_id
- trip_id
- worn - boolean
- quantity - integer (Haven't fully thought this through, but I'm guessing this will make sense for certain things)
- categories
- name - string
- user_id - integer (If user_id is nil then it is a default category?)
- brands
- name - string
- url - string