Adventure Labs Logo
Scout Docs

Herds

Table for storing team metadata

Column NameData TypeConstraints
idbigintNOT NULL
inserted_attimestamp with time zoneDEFAULT timezone('utc'::text, now()) NOT NULL
slugtextNOT NULL
descriptiontextNOT NULL
is_publicbooleanDEFAULT false NOT NULL
locationextensions.geography(Point,4326)
auto_delete_media_with_humansboolean
auto_delete_media_with_no_tracksboolean
localization_idbigintFK -> localizations
media_max_storage_bytesbigintNULL = unlimited, CHECK >= 0
media_max_daily_allowed_uploads_bytesbigintNULL = unlimited, CHECK >= 0
document_expiry_warning_period_daysintegerMember-editable via herds.write

Usage snapshots: Herd_media_usage.

EarthRanger and video credentials moved to providers; see Providers.

Security Policies (RLS)

RLS enabled. Herd scope: Herd id is herds.id.

Operationhas_herd_ability ability keyOther paths
SELECTherds.readDevice API key whose devices.herd_id matches
INSERT—Platform superadmin only (is_platform_superadmin)
UPDATEherds.writeOnly document_expiry_warning_period_days may change (herds_update_guard trigger); every other column is superadmin-only
DELETE—Platform superadmin only

Platform superadmin: FOR ALL bypass where defined.

On this page