Velaris runs on a single database — PostgreSQL 16 with pgvector by default, or MySQL / MariaDB. Every service shares it, partitioned logically by table prefix and tenant_id.
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.| Table | Description |
|---|---|
velaris_users | Platform user accounts: username, email, display_name, password_hash (bcrypt), roles (JSON array), password_change_required |
access_groups | Permission groups: id, name, parent_id (self-ref), description, tenant_id |
case_types | Workflow templates: id, name, version, definition, status, tenant_id |
case_type_stages | Stage definitions per case type: name, type (sequential/parallel/decision/loopback/terminal), order |
case_type_steps | Steps within stages: name, step_type, form reference, connector reference, order |
case_type_variables | Declared variables for a case type — the contract rules and forms bind against |
form_definitions | Form schemas: ordered field definitions with type, key, label, validation, visibility |
case_instances | Live cases (see key columns below) |
case_instance_variables | Per-case variable values — the indexed, searchable projection of case data |
case_event_log | Append-only event log driving the case timeline |
case_step_completions | One row per completed step, with the submitted data |
case_assignments | Assignment history — who held the case and when |
case_relationships | Links between cases (parent/child, related, duplicate) |
case_sla_instances | Per-case SLA state: started, paused, accumulated pause, breach time |
business_calendars | Business-hours calendars the SLA engine measures against |
escalation_trees | Escalation chains triggered on breach |
rule_definitions | Rules bound to variables and evaluated during workflow |
connector_registry | Integration connector definitions and configuration — no raw secrets |
graph_nodes / graph_edges | HxGraph structure. Node types include case_type, stage, step, form, field, module, endpoint, access_group, connector, concept, pattern. |
case_audit_log | Append-only audit trail |
case_audit_log_chain | Hash chain over the audit log — makes tampering detectable rather than merely discouraged |
audit_anchors | Periodic anchors committing the chain state |
schema_migrations | The migration ledger. One row per applied .sql file. |
| Column | Type | Description |
|---|---|---|
id | UUID PK | Case UUID — used in all API paths |
case_number | VARCHAR | Human-readable reference |
case_type_id | UUID | Which case type definition this case uses |
case_type_version | VARCHAR | Exact version at case creation — immutable, so a later edit to the case type cannot rewrite history |
current_stage_id | VARCHAR | Currently active stage |
status | VARCHAR | Case lifecycle status |
priority / urgency_score | VARCHAR / DOUBLE | Triage inputs for queue ordering |
data | JSONB | Case variable values, keyed by variable name |
metadata | JSONB | System-side annotations kept out of the variable namespace |
parent_case_id | UUID (nullable) | Parent case, for split or child cases |
process_instance_id | VARCHAR | Link to the durable process execution |
created_by | VARCHAR | Who raised the case |
tenant_id | UUID | Tenant namespace for multi-tenancy |
portal_tracking_token | UUID | Lets a portal submitter track a case without an account |
portal_submitter_name / _email | VARCHAR | Captured at portal submission |
created_at / updated_at | TIMESTAMPTZ | Creation and last modification (UTC) |
resolved_at / closed_at | TIMESTAMPTZ (nullable) | Resolution and closure timestamps — distinct, because a resolved case may stay open for a cooling-off period |
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 |
|---|---|
| HxMeet | case_sessions, case_session_participants, case_session_intelligence, case_session_caption_segments, case_session_kyc_signals, case_session_challenges, document_verifications |
| HxReplay & costing | replay_runs, replay_results, rate_cards, case_time_entries |
| HxEvolve | hxevolve_insights, hxevolve_config, hxevolve_baselines |
| HxNexus Operator (MCP) | mcp_idempotency_keys, mcp_action_proposals, mcp_token_grants |
| Marketplace | marketplace_packages, marketplace_installs, marketplace_capability_grants, marketplace_containers, marketplace_network_log, marketplace_sources, marketplace_updates, marketplace_sandbox_datasets |
| Portal v2 | portal_customers, portal_customer_cases, portal_submission_refs, case_messages, portal_csat, portal_ask_feedback |
| HxDBMigrate | hxdbmigrate_sources, hxdbmigrate_analyses, hxdbmigrate_migration_runs, hxdbmigrate_row_links, compliance_reports |
| HxGuard & HxVault | hxguard_tuples, tenant_deks, security_events, revoked_token, revoked_sessions |
| Test Suite / HxTest | hxtest_suites, hxtest_runs, hxtest_results |
| HxCheckout / HxStorefront | checkout_orders, checkout_order_items, checkout_webhook_events, and the storefront_* family |
| HxNexus Q&A | hxnexus_conversations, hxnexus_messages, hxnexus_document_chunks |
| HxSentinel | case_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 Packs | marketplace_pack_installs, marketplace_pack_upgrades |
| Marketplace conformance | marketplace_conformance, marketplace_conformance_window |
| Releases & flags | scheduled_releases, platform_update_plans, platform_update_runs |
| Compliance Suite | consent_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 & LLMOps | ai_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 bus | case_events (UNIQUE (case_id, seq) orders the stream, detects gaps and acts as the concurrency check) |
| HxSandbox | hxsandbox_modules |
| Table | Purpose |
|---|---|
payment_requests | Stripe checkout sessions per case step |
payment_webhook_events | Inbound Stripe webhooks with HMAC verification state |
payment_disbursements | Outbound payment records (pay-to-customer) |
identity_verifications | Onfido check records (check_id internal only) |
esign_requests | DocuSign envelope records (envelope_id internal only) |
crm_sync_records | Salesforce upsert history per case |
invoice_records | Xero invoice draft records per case |
sms_messages | Twilio SMS send records |
slack_notifications | Slack webhook send records |
doc_extraction_jobs | Docling OCR job results |
doc_storage_routes | S3 presigned URL records with expiry |
webhook_receiver_rules | Inbound webhook routing configurations |
webhook_receiver_events | Inbound webhook event log with routing outcomes |
-- 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;
data directly is dialect-specific — the variable projection is not.These already exist — you do not need to create them. Check here before adding an index that duplicates one.
| Index | Serves |
|---|---|
idx_cases_status | Queue and list filtering |
idx_cases_type | Per-case-type reporting |
idx_cases_priority, idx_cases_urgency | Triage ordering (urgency is DESC) |
idx_cases_parent | Child-case lookups |
idx_cases_created | Recency ordering (DESC) |
idx_cases_data (GIN) | JSONB containment queries on case variables |
idx_cases_tenant | Tenant scoping |
idx_cases_portal_token | Partial index — portal tracking lookups only where a token exists |
idx_case_instances_case_number | Reference lookups |
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;.