Skip to content

Bases

bases

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

Columns

Column Type Nullable Default Notes
base_id uuid NO gen_random_uuid() PK
base_schema jsonb NO Full sync configuration
base_status text NO active, paused, removed, etc.
created_time timestamp YES now()
workspace_id bigint YES 0 FK to workspaces
created_by bigint YES 0 FK to users
last_modified_by bigint YES 0 FK to users
last_modified_time timestamp YES now()
triggers jsonb YES [] Scheduled/webhook trigger definitions
min_switch_on_time timestamp YES now() - interval '10 seconds' Cooldown before re-enabling
options jsonb NO {}
parent_folders jsonb YES Folder hierarchy path
base_resource_id varchar YES Human-readable resource ID

Key indexes

  • primary_4 on (base_id)
  • idx_base_status on (base_status)
  • unique_base_name_per_workspace UNIQUE on (base_schema->>'base_name', workspace_id) WHERE base_status <> 'removed'
  • bases_workspace_id_idx on (workspace_id) WHERE base_status <> 'removed'

Notes

  • Soft-deleted via base_status = 'removed'; partial unique indexes exclude removed rows.
  • base_schema is the canonical sync configuration blob (apps, mappings, field rules, etc.).