Pins
Table for storing map pins with location, styling, and descriptive metadata
| Column Name | Data Type | Constraints |
|---|---|---|
| id | bigint | NOT NULL |
| created_at | timestamp with time zone | DEFAULT now() NOT NULL |
| altitude_relative_to_ground | bigint | NOT NULL |
| color | text | NOT NULL |
| name | text | NOT NULL |
| description | text | |
| herd_id | bigint | NOT NULL |
| created_by | uuid | |
| location | extensions.geography(Point,4326) | DEFAULT '0101000020E610000000000000000000000000000000000000' |
Security Policies (RLS)
RLS enabled. Herd scope: Herd from pins.herd_id.
| Operation | has_herd_ability ability key | Other paths |
|---|---|---|
| SELECT | map.read | — |
| INSERT | map.write | Also requires created_by = auth.uid() |
| UPDATE | map.write | — |
| DELETE | map.write | — |
Platform superadmin: FOR ALL bypass where defined.