app.change_order_lines
TableRow level security on
Lines of a change order. A NULL unit price is unpriced; a zero price is stored only when declared no-cost, so an unpriced change order is never stored at zero (invariant 11). Lines change only while the change order is Proposed.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.change_orders on insert; never accepted from the caller and never changed.References app.organizations.id |
| change_order_id | uuid | No | Change order the line belongs to.References app.change_orders.id |
| budget_line_id | uuid | Yes | Budget line the change adjusts, when it adjusts an existing one.References app.budget_lines.id |
| description | text | No | What changes. |
| urid | text | No | Dimension 2 discipline or category of the change. |
| quantity | numeric | No | Quantity. |
| unit_price_minor | bigint | Yes | Unit price in minor units of the budget currency; NULL is unpriced. |
| is_no_cost | boolean | No | True when the line is priced at zero on purpose. A zero price without it is refused. |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |