Skip to content

Instantly share code, notes, and snippets.

@hungryzi
Last active December 11, 2015 13:18
Show Gist options
  • Save hungryzi/4606634 to your computer and use it in GitHub Desktop.
Save hungryzi/4606634 to your computer and use it in GitHub Desktop.
2nd try to improve inventory data modelling
# Sample record for 'catalog_items'
catalog_item =
id: 42
serialized: 1
category_id: 8
location_with_quantity: [1, 3]
# Sample record for 'inventory_items'
inventory_item =
id: 1
catalog_item_id: 42
quantity: 8
location_id: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment