Product Compatibilities
Maps product families to compatible accessory product numbers
| Column Name | Data Type | Constraints |
|---|---|---|
| primary_product_id | bigint | NOT NULL, PK, FK -> products |
| role | text | NOT NULL, PK |
| accessory_product_number | text | NOT NULL, PK, FK -> product_numbers |
| auto_assign | boolean | DEFAULT false NOT NULL |
| inserted_at | timestamp with time zone | DEFAULT timezone('utc'::text, now()) NOT NULL |
Unique partial index: one auto_assign = true row per (primary_product_id, role).
Security Policies (RLS)
RLS enabled. Scope: Global catalog, same access model as products.
| Operation | Path |
|---|---|
| SELECT | has_view_role_any_herd, device API key, or platform superadmin |
| INSERT | Platform superadmin only |
| UPDATE | Platform superadmin only |
| DELETE | Platform superadmin only |