Shop schema
1
differing categories
0
destructive
1
warning
0
safe
Drift
| Category | Objects | Severity |
|---|---|---|
| columns_added | 1 | warning |
compared 2026-08-30T12:00:00Z
Diagram
Left to right by dependency: a table sits right of everything it references, so this order is one the tables can be created in.
Tables
customers
Customers who can place orders| Column | Type | Null | Key | Default | References | Comment |
|---|---|---|---|---|---|---|
| id | INTEGER | — | primary | |||
| TEXT | — | unique | ||||
| country | TEXT | — |
| Index | Columns | Unique |
|---|---|---|
| idx_customers_country | country |
order_items
Products and quantities attached to an order| Column | Type | Null | Key | Default | References | Comment |
|---|---|---|---|---|---|---|
| id | INTEGER | — | primary | |||
| order_id | INTEGER | — | → orders(id) | |||
| product_id | INTEGER | — | → products(id) | |||
| quantity | INTEGER | — | 1 |
orders
Orders placed by customers| Column | Type | Null | Key | Default | References | Comment |
|---|---|---|---|---|---|---|
| id | INTEGER | — | primary | |||
| customer_id | INTEGER | — | → customers(id) | |||
| status | TEXT | — | pending | |||
| placed_at | TEXT | null |
products
Products available for ordering| Column | Type | Null | Key | Default | References | Comment |
|---|---|---|---|---|---|---|
| id | INTEGER | — | primary | |||
| sku | TEXT | — | unique | |||
| name | TEXT | — |