inventory_items table

The inventory_items table in the E-commerce Database Schema schema has 6 columns, keyed by id, with 2 foreign keys to product_variants and warehouses. 1 column in inventory_movements references it.

Sellable stock is on_hand minus reserved. Reserved rises when an order is placed, on_hand falls when it ships.

Columns (6)

Columns of the inventory_items table
ColumnTypeConstraintsDescription
iduuidprimary key
variant_iduuidnot null, references product_variants.id
warehouse_iduuidnot null, references warehouses.id
on_handintegernot null
reservedintegernot null
reorder_pointinteger

Indexes (1)

  • (variant_id, warehouse_id) unique

Relationships