Building_material_adjustments records design_id, line_key, usage, item, category, unit, the original take-off quantity, the new quantity, where the change came from (estimates / project / field) and an optional reason. The current quantity for a line is simply its most recent row.
Also called: material change history · who changed the quantity · material audit log
- 1materialLineKey(usage, item, lengthFt) identifies a line across surfaces
- 2Each edit inserts a new row rather than updating one
- 3latestQtyByLine walks the rows newest-first and takes the first per key
- 4A reset inserts qty = takeoff_qty, with reason 'reset-all' on a bulk reset
- 5source is constrained to estimates / project / field so a later field report shares the same log
Migration 233: 'Each write is a new row (append-only) so Estimates, Project Management, and a later field report all share one audit log keyed by design_id… Reset = insert qty = takeoff_qty (the history stays).'
- An overwritten quantity erases the reason it was changed
- Three surfaces editing the same line with no shared record
See it on your own jobs
Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.
or keep browsing features →