shipments table

The shipments table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to orders and warehouses. 1 column in shipment_lines references it.

An order can ship in several parcels, from several warehouses.

Columns (8)

Columns of the shipments table
ColumnTypeConstraintsDescription
iduuidprimary key
order_iduuidnot null, references orders.id
warehouse_iduuidnot null, references warehouses.id
statusshipment_statusnot null
carriervarchar(80)
tracking_numbervarchar(120)
shipped_attimestamptz
delivered_attimestamptz

Indexes (2)

  • (order_id)
  • (status)

Relationships