Core Tables

Table names do not always match the concept name. Cases live in case_instances, not cases. Platform users live in velaris_users — renamed from helix_users by migration 137 in v2.2.0, alongside velaris_settings (migration 138). The flow engine's own helix_processes and helix_process_instances keep the Helix name deliberately. Use the names below verbatim.
TableDescription
velaris_usersPlatform user accounts: username, email, display_name, password_hash (bcrypt), roles (JSON array), password_change_required
access_groupsPermission groups: id, name, parent_id (self-ref), description, tenant_id
case_typesWorkflow templates: id, name, version, definition, status, tenant_id
case_type_stagesStage definitions per case type: name, type (sequential/parallel/decision/loopback/terminal), order
case_type_stepsSteps within stages: name, step_type, form reference, connector reference, order
case_type_variablesDeclared variables for a case type — the contract rules and forms bind against
form_definitionsForm schemas: ordered field definitions with type, key, label, validation, visibility
case_instancesLive cases (see key columns below)
case_instance_variablesPer-case variable values — the indexed, searchable projection of case data
case_event_logAppend-only event log driving the case timeline
case_step_completionsOne row per completed step, with the submitted data
case_assignmentsAssignment history — who held the case and when
case_relationshipsLinks between cases (parent/child, related, duplicate)
case_sla_instancesPer-case SLA state: started, paused, accumulated pause, breach time
business_calendarsBusiness-hours calendars the SLA engine measures against
escalation_treesEscalation chains triggered on breach
rule_definitionsRules bound to variables and evaluated during workflow
connector_registryIntegration connector definitions and configuration — no raw secrets
graph_nodes / graph_edgesHxGraph structure. Node types include case_type, stage, step, form, field, module, endpoint, access_group, connector, concept, pattern.
case_audit_logAppend-only audit trail
case_audit_log_chainHash chain over the audit log — makes tampering detectable rather than merely discouraged
audit_anchorsPeriodic anchors committing the chain state
schema_migrationsThe migration ledger. One row per applied .sql file.

case_instances — Key Columns

ColumnTypeDescription
idUUID PKCase UUID — used in all API paths
case_numberVARCHARHuman-readable reference
case_type_idUUIDWhich case type definition this case uses
case_type_versionVARCHARExact version at case creation — immutable, so a later edit to the case type cannot rewrite history
current_stage_idVARCHARCurrently active stage
statusVARCHARCase lifecycle status
priority / urgency_scoreVARCHAR / DOUBLETriage inputs for queue ordering
dataJSONBCase variable values, keyed by variable name
metadataJSONBSystem-side annotations kept out of the variable namespace
parent_case_idUUID (nullable)Parent case, for split or child cases
process_instance_idVARCHARLink to the durable process execution
created_byVARCHARWho raised the case
tenant_idUUIDTenant namespace for multi-tenancy
portal_tracking_tokenUUIDLets a portal submitter track a case without an account
portal_submitter_name / _emailVARCHARCaptured at portal submission
created_at / updated_atTIMESTAMPTZCreation and last modification (UTC)
resolved_at / closed_atTIMESTAMPTZ (nullable)Resolution and closure timestamps — distinct, because a resolved case may stay open for a cooling-off period
Call them variables. The values in data are case variables, not properties or attributes. case_instance_variables is their indexed projection — query that for search and reporting, and read data when you want the whole document.

Module Tables (v2.3.0)

ModuleTables
HxMeetcase_sessions, case_session_participants, case_session_intelligence, case_session_caption_segments, case_session_kyc_signals, case_session_challenges, document_verifications
HxReplay & costingreplay_runs, replay_results, rate_cards, case_time_entries
HxEvolvehxevolve_insights, hxevolve_config, hxevolve_baselines
HxNexus Operator (MCP)mcp_idempotency_keys, mcp_action_proposals, mcp_token_grants
Marketplacemarketplace_packages, marketplace_installs, marketplace_capability_grants, marketplace_containers, marketplace_network_log, marketplace_sources, marketplace_updates, marketplace_sandbox_datasets
Portal v2portal_customers, portal_customer_cases, portal_submission_refs, case_messages, portal_csat, portal_ask_feedback
HxDBMigratehxdbmigrate_sources, hxdbmigrate_analyses, hxdbmigrate_migration_runs, hxdbmigrate_row_links, compliance_reports
HxGuard & HxVaulthxguard_tuples, tenant_deks, security_events, revoked_token, revoked_sessions
Test Suite / HxTesthxtest_suites, hxtest_runs, hxtest_results
HxCheckout / HxStorefrontcheckout_orders, checkout_order_items, checkout_webhook_events, and the storefront_* family
HxNexus Q&Ahxnexus_conversations, hxnexus_messages, hxnexus_document_chunks
HxSentinelcase_outcomes, case_outcome_labels, case_risk_signals, case_risk_rules, case_risk_config, case_risk_findings, case_risk_holds, case_risk_feedback, case_risk_score_disputes, case_risk_rule_proposals, case_risk_signal_packs, case_risk_models
Accelerator Packsmarketplace_pack_installs, marketplace_pack_upgrades
Marketplace conformancemarketplace_conformance, marketplace_conformance_window
Releases & flagsscheduled_releases, platform_update_plans, platform_update_runs
Compliance Suiteconsent_records (append-only — a withdrawal is a new row, never an update), pii_findings, ledger_accounts, ledger_transactions, ledger_entries, backup_records, health_check_results, retention_policies
AI actions & LLMOpsai_action_proposals (the model proposes; a human accepts, edits or rejects — an auto-accepted write still leaves a row), llm_calls
Event sourcing & the event buscase_events (UNIQUE (case_id, seq) orders the stream, detects gaps and acts as the concurrency check)
HxSandboxhxsandbox_modules

HxConnect Tables

TablePurpose
payment_requestsStripe checkout sessions per case step
payment_webhook_eventsInbound Stripe webhooks with HMAC verification state
payment_disbursementsOutbound payment records (pay-to-customer)
identity_verificationsOnfido check records (check_id internal only)
esign_requestsDocuSign envelope records (envelope_id internal only)
crm_sync_recordsSalesforce upsert history per case
invoice_recordsXero invoice draft records per case
sms_messagesTwilio SMS send records
slack_notificationsSlack webhook send records
doc_extraction_jobsDocling OCR job results
doc_storage_routesS3 presigned URL records with expiry
webhook_receiver_rulesInbound webhook routing configurations
webhook_receiver_eventsInbound webhook event log with routing outcomes

JSONB Queries

-- Find cases by variable value (containment operator)
SELECT id, case_number FROM case_instances
WHERE data @> '{"priority": "high", "category": "complaint"}'
  AND status = 'open';

-- Extract a single variable
SELECT id, data->>'customer_email' AS email FROM case_instances;

-- Prefer the indexed projection for search and reporting
SELECT c.case_number, v.value
FROM case_instance_variables v
JOIN case_instances c ON c.id = v.case_id
WHERE v.name = 'priority' AND v.value = 'high';

-- Case timeline
SELECT event_type, created_at FROM case_event_log
WHERE case_id = $1 ORDER BY created_at DESC;
JSONB is PostgreSQL-shaped. On MySQL / MariaDB the containment operator does not exist and these queries need the JSON functions instead. Anything you write against data directly is dialect-specific — the variable projection is not.

Shipped Indexes on case_instances

These already exist — you do not need to create them. Check here before adding an index that duplicates one.

IndexServes
idx_cases_statusQueue and list filtering
idx_cases_typePer-case-type reporting
idx_cases_priority, idx_cases_urgencyTriage ordering (urgency is DESC)
idx_cases_parentChild-case lookups
idx_cases_createdRecency ordering (DESC)
idx_cases_data (GIN)JSONB containment queries on case variables
idx_cases_tenantTenant scoping
idx_cases_portal_tokenPartial index — portal tracking lookups only where a token exists
idx_case_instances_case_numberReference lookups
Semantic search is optional. pgvector powers HxGraph similarity and semantic deduplication when the extension is installed and PGVECTOR_ENABLED is on. It is not required — without it those features degrade rather than fail, and a default development database may not have the extension at all. Check with SELECT extname FROM pg_extension;.