Battery Cycle Counts
Point-in-time cumulative cycle-count observations for battery parts
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| battery_id | bigint | NOT NULL, FK -> parts |
| cycle_count | integer | NOT NULL, >= 0 |
| timestamp_observation | timestamp with time zone | NOT NULL |
| inserted_at | timestamp with time zone | DEFAULT timezone('utc'::text, now()) NOT NULL |
Rows are unique by battery and observation timestamp.
Security Policies (RLS)
RLS enabled. Access resolves through battery_id using part_content_access.
| Operation | has_herd_ability ability key | Other paths |
|---|---|---|
| SELECT | telemetry.read | Owning device API key or approved gateway |
| INSERT | telemetry.write | Owning device API key or approved gateway |
| UPDATE | telemetry.write | Owning device API key or approved gateway |
| DELETE | telemetry.write | Owning device API key or approved gateway |
Platform superadmin: FOR ALL.