app.project_measurements
TableRow level security on
Figures measured on a project (Section 4.10): waste, energy, water and transport, audience and sentiment, each per metric, day and source. A NULL value is a figure that was not measured and reports show it as Unmeasured, never as zero. Corrections of the value, unit or day need a reason and are written to app.project_measurement_corrections. Who recorded a figure and when are created_by and created_at.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.projects on insert; never accepted from the caller and never changed.References app.organizations.id |
| project_id | uuid | No | Project measured.References app.projects.id |
| metric_code | text | No | Metric measured (app.measurement_metrics); earned media figures are not entered here but come from app.earned_media_items.References private.measurement_metrics.metric_code |
| measured_on | date | No | Day the figure covers, on the project's calendar (private.project_today when not given); never after today there. |
| value | numeric | Yes | The figure in unit_code; NULL when it was not measured (Unmeasured), never zero for a missing figure. |
| unit_code | text | Yes | Unit of the figure, of the metric's dimension; required when value is set.References private.measurement_units.unit_code |
| source | app.measurement_source | No | Manual, Import or Integration. |
| source_reference | text | Yes | What the figure came from, such as a hauler's invoice, a meter reading or a file name. |
| source_uri | text | Yes | Link to the source, an http(s) URL or a URN. |
| note | text | Yes | Note on the figure. |
| correction_reason | text | Yes | Why a correction is made: required when the value, unit or day changes, written to the correction ledger with the change, and never stored on the row. |
| 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 |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |