Database schema · Diagram Design
The physical schema behind checkout: five tables, real SQL types, and foreign keys that anchor column to column, not box to box. The dashed group marks the non-default `billing` schema.
THE DESTRUCTIVE EDGE
`order_items.order_id` is the one `ON DELETE CASCADE` in this schema — remove an order and its line items go with it. Every other foreign key is `RESTRICT`.
`products` truncates to a `+ 3 more columns` row rather than dumping every column. This is checkout, not a `\d+` of the whole database.