locations table

The locations table in the Inventory Management Database Schema schema has 8 columns, keyed by id, with 1 foreign key to warehouses. 6 columns in stock_items, stock_movements, goods_receipt_lines, stock_transfer_lines and 1 more reference it.

Bin-level detail. Stock is held at a location, never merely at a warehouse, so a pick list can name an exact shelf.

Columns (8)

Columns of the locations table
ColumnTypeConstraintsDescription
iduuidprimary key
warehouse_iduuidnot null, references warehouses.id
codevarchar(40)not null
typelocation_typenot null
aislevarchar(20)
rackvarchar(20)
shelfvarchar(20)
is_pickablebooleannot null

Indexes (2)

  • (warehouse_id, code) unique
  • (warehouse_id, type)

Relationships