app.project_measurement_corrections
TablaSeguridad a nivel de fila activa
Append-only ledger of every correction, withdrawal and restore of a recorded figure, with the figure before and after and the reason. Who made the change and when are created_by and created_at. Written only by the measurement guard.
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.project_measurements on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| project_measurement_id | uuid | No | Figure that changed.Hace referencia a app.project_measurements.id |
| correction_kind | app.measurement_correction_kind | No | Corrected, Withdrawn or Restored. |
| previous_value | numeric | Sí | Value before the change; NULL when it was Unmeasured. |
| previous_unit_code | text | Sí | Unit before the change.Hace referencia a private.measurement_units.unit_code |
| previous_measured_on | date | No | Day before the change. |
| value | numeric | Sí | Value after the change; NULL when Unmeasured. |
| unit_code | text | Sí | Unit after the change.Hace referencia a private.measurement_units.unit_code |
| measured_on | date | No | Day after the change. |
| reason | text | Sí | Why the figure changed; required for a correction. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |