Certificates
Table for storing certificates with issuer, expiration and tracking information
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| created_at | timestamp with time zone | DEFAULT now() NOT NULL |
| issuer | text | NOT NULL |
| expiration | timestamp with time zone | |
| type | text | NOT NULL |
| tracking_number | text | |
| part_id | bigint | |
| updated_at | timestamp with time zone | DEFAULT now() |
Security Policies (RLS)
RLS enabled. Herd scope: Herd from certificates.part_id → get_herd_id_by_part_id (requires 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.