OrderLines table

The OrderLines table in the FitStack - V2 schema has 7 columns, keyed by Id, with 2 foreign keys to Orders and GymProductVariants.

No audit columns: lines live and die with the Order.

Columns (7)

Columns of the OrderLines table
ColumnTypeConstraintsDescription
Iduuidprimary key, not null
OrderIduuidnot null, references Orders.IdCASCADE.
VariantIduuidnot null, references GymProductVariants.IdRESTRICT.
NameSnapshotcharacter varying(300)not nullProduct + Variant name as sold.
Quantityintegernot null
UnitPriceCentsintegernot null
TaxCentsintegernot null

Indexes (1)

  • (OrderId) (IX_OrderLines_OrderId)

Relationships