Downtime Reason
A Downtime Reason categorizes why a Machine or Station was not producing. Downtime reasons follow the group-reason hierarchy described in Reason Taxonomy, with the additional dimension of downtime type on the group level.
Database Tables
oee_downtime_groups
| Column | Type | Description |
|---|---|---|
id | UUID (PK) | Auto-generated |
site_id | UUID (FK) | References Site |
name | VARCHAR(100) | Group name (e.g., “MECHANICAL”) |
type | VARCHAR(20) | 'unplanned', 'planned', or 'idle' |
sort_order | INTEGER | Display ordering |
The type field is unique to downtime groups and affects OEE calculations:
unplanned— Breakdowns, unexpected failures. Reduces Availability.planned— Scheduled maintenance, changeovers. May or may not affect Availability depending on Siteavailability_mode.idle— No work scheduled. Affects TEEP but not standard OEE.
oee_downtime_reasons
| Column | Type | Description |
|---|---|---|
id | UUID (PK) | Auto-generated |
group_id | UUID (FK) | References oee_downtime_groups |
code | VARCHAR(50) | Reason code (e.g., “E042”), unique per group |
name | VARCHAR(255) | Reason name (e.g., “Conveyor Jam”) |
description | TEXT | Optional details |
is_active | BOOLEAN | Whether reason is selectable |
sort_order | INTEGER | Display ordering |
Note: The type field was removed from reasons — it is inherited from the parent group.
Usage
- Referenced by
oee_machine_events.downtime_reason_idwhenevent_type = 'downtime' - Downtime type (from parent group) determines how the time is classified in OEE calculations
Codebase Paths
- Tables:
database/sql_scripts/tables/oee_downtime_groups.sql,database/sql_scripts/tables/oee_downtime_reasons.sql