Maintenance
Maintenance records for device parts
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| part_id | bigint | NOT NULL |
| timestamp_completion | timestamp with time zone | NOT NULL |
| description | text | |
| type | text | |
| created_at | timestamp with time zone | DEFAULT now() NOT NULL |
| updated_at | timestamp with time zone | DEFAULT now() |
Security Policies (RLS)
RLS enabled. Herd scope: Herd from maintenance.part_id → get_herd_id_by_part_id.
| Operation | has_herd_ability ability key | Other paths |
|---|---|---|
| SELECT | devices.read | — |
| INSERT | devices.write | — |
| UPDATE | devices.write | — |
| DELETE | devices.write | — |
Platform superadmin: FOR ALL bypass where defined.