Skip to content
Updated Sep 26, 2026 by Barča Dvořáková · Owner: analysisactiveentityconfluence-migration Edit on GitHub

Entity: buildingCoefficient ​

Entity Type: Database table

Description: Originally specified as a versioned climate correction coefficient applied at the building level before Consumption records are written. Per the 2026-08-19 decision, climate correction (degree-day normalisation) is computed on demand from climateData/climateNormal and is not stored — so this entity's calculated source case no longer applies. If retained, its scope narrows to manual override only: an admin-entered correction for a specific building/period that takes precedence over the computed value. Climate input data for the computed value comes from the WeatherStation linked via building.climateStationId; this entity does not participate in that calculation.

Status under review (per source page, as of 2026-08-19). The climate correction this entity was designed to store is computed at read time from climateData + climateNormal and is not persisted (resolved F348 discussion). As a consequence this entity is very likely obsolete for the calculated source case. If this entity (or a migration for it) has already been implemented, do not drop it silently — raise a dedicated implementation ticket to remove/rework it, since that is a code and possibly data change, not just a documentation fix.

Data Attributes Table ​

Attribute NameDescriptionData TypeDefault ValueRequired (= Nullable)UniqueFormatValidationsIndexExample
idPrimary key of the entityUUIDGeneratedYesYesUUID v4-Primary Keya1b2c3d4-…
buildingIdThe building this coefficient applies to.UUID-YesNoUUID v4Foreign Key → building; must existname: idx_buildingCoefficient_buildingId_validFrom, type: btree (composite with validFrom DESC)b2c3d4e5-…
validFromThe date from which this coefficient is valid. Applied to all Consumption records on or after this date, up to the next record's validFrom.Date-YesNoYYYY-MM-DDMust be unique per buildingId (no two records for the same building on the same date)name: idx_buildingCoefficient_buildingId_validFrom, type: btree (composite with buildingId)2024-01-01
valueThe coefficient value applied to raw consumption. A multiplier (e.g. 1.12 means +12% adjustment for a colder-than-reference period) or an additive correction, depending on normalisationMethod.Decimal-YesNodecimal(10,6)Must be > 0 for multiplier; any value for additive-1.120000
normalisationMethodDefines how the coefficient value is applied to raw consumption.EnummultiplierYesNoenummultiplier / additive-multiplier
sourceIndicates how the coefficient value was determined.EnummanualYesNo-manual / calculated-calculated
noteOptional free-text explanation of why this coefficient value was set (e.g. "unusually cold winter, adjusted for January–March").StringnullNoNo-Max 500 characters-Cold spell Jan–Mar 2024, degree-day factor 1.12
createdAtTimestamp of when the record was created.Timestampnow()YesNoYYYY-MM-DDTHH:mm:ss.SSS+00--2024-03-01T08:00:00.000+00
updatedAtTimestamp of the last update to the record.Timestampnow()YesNoYYYY-MM-DDTHH:mm:ss.SSS+00--2024-06-15T14:22:00.000+00
createdByIdentifier of the actor who created the record (user ID or system).StringsystemYesNo-Non-empty-user:a1b2c3d4 / system
updatedByIdentifier of the actor who last updated the record (user ID or system).StringsystemYesNo-Non-empty-user:a1b2c3d4 / system

Discrepancies vs. the playbook (§3.2, §4, §5), preserved faithfully from the source page rather than silently fixed:

  • No tenantId column, though the playbook's identity-columns rule requires it on every entity. Not added here — flagged for follow-up.
  • No deletedAt column, though the standard audit quintet includes it. Not added here — flagged for follow-up.
  • id uses UUID v4 in the source page rather than the playbook's UUID v7 convention (§4). Documented as given.
  • Index names in the source use camelCase (idxBuildingCoefficientBuildingValid) rather than the playbook's idx_entity_attribute snake_case pattern; renamed here to match the playbook, semantics unchanged.

Audited fields ​

Recorded on created (in full), updated (changed only) and deleted (in full): buildingId, validFrom, value, normalisationMethod, source, note.

Excluded: none.

Per this entity's own status note, its calculated source case is very likely obsolete (climate correction is now computed on demand from climateData/climateNormal, not stored here) — if the entity is dropped or reworked, this section should be revisited alongside it rather than left describing a removed table.

Not registered for entityName resolution, and has no independent human-readable attribute to register — identified by its buildingId/validFrom pair.