Skip to content

Connections

connections

  • Schema: public
  • PK: connection_id (uuid, gen_random_uuid())

Columns

Column Type Nullable Default Notes
connection_id uuid NO gen_random_uuid() PK
connection_name varchar NO
app_type varchar NO Integration type slug
credentials varchar NO Encrypted credential blob
credentials_preview varchar NO Masked display string
is_shared_with_workspace bool YES false
workspace_id bigint NO FK to workspaces
created_by bigint NO FK to users
created_time timestamp YES now()
last_modified_by bigint NO FK to users
last_modified_time timestamp YES now()
app_type_display varchar NO Human-readable app name
connection_options jsonb YES {}
expiration_time timestamp YES Token expiry (OAuth)
provider_name varchar YES Links to connections_providers
is_under_refresh bool YES Token refresh lock flag
refresh_start_time timestamp YES When refresh began
is_valid bool YES true Set to false on auth failure
max_concurrent_processes_per_connection int4 YES Rate-limit guard
connection_resource_id varchar NO Human-readable resource ID
parent_folders jsonb YES Folder hierarchy path

Key indexes

  • connections_pkey on (connection_id)
  • unique_connection_resource_id UNIQUE on (connection_resource_id, workspace_id)
  • unique_connection_name UNIQUE on (workspace_id, connection_name)

Notes

  • credentials column is encrypted at rest; never expose raw values.
  • is_under_refresh / refresh_start_time implement distributed lock for OAuth token refresh.