Capacity Private Cloud Data Dictionary
This article is a reference for the PostgreSQL tables used by Capacity Private Cloud. Operators, DBAs, and integrators use it to understand where each class of data lives, which service owns it, and what maintenance considerations apply when planning retention, cleanup, or backup policies.
For the operational procedures that act on these tables, see Cleanup scripts for Postgres and MongoDB databases.
Applies to: v5.x and greater deployments. The schemas described below are verified against current service source code. Version-specific annotations appear where a column was added in v6.0.0 or v7, so operators on earlier active versions know what they don't yet have. The voice biometrics schema is stable from v3.4 onward and applies to all supported versions.
Service Ownership
Tables are organized by the service that owns them. Each service runs in its own deployment and manages its own schema:
- Archive service — session, interaction, analysis, and binary-reference data
- Voice biometrics service — biometric session and operation data, audit logs, language reference
- Configuration service — speech and voice biometrics configuration
- Deployment service — deployment metadata, encryption-key material, post-processing profiles, admin settings
- License service — phone-home counters and license state
Archive Service
The archive service captures session, interaction, and binary-reference data when archiving is enabled. Tables in this group are the primary subjects of routine cleanup and retention workflows.
session
List of all archived sessions when archiving is enabled. Each row represents one session.
Maintenance: Retention policy decision. Removing a session cascades to its interactions, audio, and any analysis sets built from it (via foreign keys with ON DELETE CASCADE).
| Field | Details |
| id | uuid — primary key |
| deployment_id | uuid — not null |
| start_date | timestamp with time zone — not null |
| end_date | timestamp with time zone — not null |
| waiting_interactions | text |
| settings | text |
| num_interactions | integer — not null |
| archive_metadata | bytea — default null |
| audio_metadata | text — v6.x+ only (added v6.0.0) |
interaction
List of all archived interactions when archiving is enabled. Foreign-keyed to session with ON DELETE CASCADE.
Maintenance: Cleaned alongside the parent session per retention policy.
| Field | Details |
| id | uuid — primary key |
| type | integer — not null |
| sub_type | integer — not null |
| status | integer — not null |
| settings | text |
| required_grammars | text |
| language | text |
| start_date | timestamp with time zone — not null |
| end_date | timestamp with time zone — not null |
| deployment_id | uuid — not null |
| session_id | uuid — not null — FK to session(id) ON DELETE CASCADE |
| audio_metadata | text |
| request_metadata | text |
| result_metadata | text |
| grammar_hash | text[] |
| ssml_hash | text[] |
| result_external | text |
| channel_id | integer |
| main_type | integer default 0 — not null |
| archive_metadata | bytea — default null |
| phrases_hash | text[] — default null |
| session_grammar_labels | text[] — v7+ only (surfaces session grammar labels in interaction-details and dataset views) |
analysis_set
One row per analysis set created in the analysis portal. Each analysis set has a corresponding analysis_interaction_[analysis_set_id] table holding its interaction set. Analysis sets can only be created when archiving is enabled.
Maintenance: Removing a row here should also drop the corresponding analysis_interaction_[id] table. The analysis portal handles this when sets are deleted through the UI.
| Field | Details |
| analysis_set_id | uuid default gen_random_uuid() — not null |
| deployment_id | uuid — not null |
| description | text |
| created_date | timestamp with time zone default now() — not null |
| filter_json | text — not null |
| num_sessions / num_interactions | integer — not null |
| job_status_json / filter_summary / settings_json / analysis_json | text |
| analysis_set_status | integer default 0 — not null |
| properties | bytea |
analysis_interaction_[analysis_set_id]
One table per analysis set, named with the analysis set's UUID as a suffix, holding the interaction rows selected for that analysis set. Original and tuned engine result columns sit side-by-side for direct comparison.
Maintenance: Drop the table when its parent analysis_set row is removed. The analysis portal handles this automatically when sets are deleted through the UI.
| Field | Details |
| id, session_id, interaction_id | uuid |
| interaction_type, interaction_main_type, interaction_sub_type, status, channel_id | integer |
| status_text, audio_format, error, transcript_text, transcript_si, notes | varchar |
| start_date, end_date | timestamp with time zone |
org_* (original) — config, text, si, score, final_result_status, final_result_text, grammar_hash, phrases_hash, archive_metadata, plus original_result | Original engine result columns (varchar / integer / text / smallint) |
| tuned_* — result, config, text, si, score, status, final_result_status, final_result_text, grammar_hash, phrases_hash, archive_metadata | Tuned engine result columns (varchar / integer / text / smallint) |
storage_audio
References to audio files stored in MongoDB, used by the portal for playback. Foreign-keyed to session with ON DELETE CASCADE.
Maintenance: Cleaned alongside the parent session per retention policy.
| Field | Details |
| deployment_id | uuid — not null |
| session_id | uuid — not null — FK to session(id) ON DELETE CASCADE |
| channel_id | integer default 0 — not null |
| interaction_id | uuid |
| storage_ref | uuid — not null |
| created_date | timestamp with time zone default now() — not null |
storage_grammar, storage_ssml, storage_phrases
References to cached grammar, SSML, and phrase-list content. Grammar and SSML content lives in MongoDB and is referenced here by storage_ref; phrase content is stored inline in PostgreSQL. All three tables are keyed by (deployment_id, hash_string).
Maintenance: Optional — cached items grow more slowly than session and interaction data, but cleanup is recommended on long retention horizons.
| Field | Details |
| deployment_id | uuid — not null |
| hash_string | text — not null |
| storage_ref | uuid — not null (storage_grammar, storage_ssml only) |
| phrases_string | text — not null (storage_phrases only — content stored inline) |
| created_date | timestamp with time zone default now() — not null |
Voice Biometrics Service
These tables back the voice biometrics service and are present only on deployments that include voice biometrics. They cover transactional session data, audit logs, error and result tracking, and the supporting reference tables. The voice biometrics schema has been stable since v3.4 and applies to all supported versions.
BiometricSession
Transactional record for each voice biometrics session (enrollment or verification).
Maintenance: Driven by session growth rate and the client's retention policy.
| Field | Details |
| SessionSymbol | uuid — not null |
| SessionType / SessionStatus | text — not null |
| SessionStart / SessionEnd | timestamp with time zone — not null |
| IdentitySymbol / ConfigurationSymbol / DeploymentId | uuid — not null |
| EnrollmentTag | varchar(256) |
| LanguageId | smallint — not null |
BiometricStep
Each step within an enrollment or verification session. A standard enrollment generates at least three steps to capture the three required audio samples.
Maintenance: Apply the same retention rules as BiometricSession.
| Field | Details |
| CorrelationId / SessionSymbol | uuid — not null |
| Phrase | varchar — not null |
| Step | smallint default 0 — not null |
| StatusHint | text — not null |
| StatusText | varchar |
BiometricStepResult
Results for each step within an enrollment or verification session.
Maintenance: Apply the same retention rules as BiometricSession.
| Field | Details |
| CorrelationId | uuid — not null |
| ResultTypeId | integer — not null |
| ResultValue / ResultLevel | text — not null |
BiometricError
Errors associated with a particular step in an enrollment or verification session.
Maintenance: Apply the same retention rules as BiometricSession.
| Field | Details |
| ErrorId | uuid default uuid_generate_v4() — not null |
| Error / Message | varchar — not null |
| ErrorCode / HttpStatusCode | integer — not null |
| MessageData | varchar |
| BiometricStepId | uuid — not null |
BiometricOperation
Every voice biometrics API operation — enroll, verify, create speaker, delete speaker, and so on — is recorded here for audit and operational analysis.
Maintenance: Driven by the client's security audit requirements and retention policy.
| Field | Details |
| CorrelationId / OperatorId / DeploymentId | uuid — not null |
| OperationName | varchar(256) — not null |
| HostNameIp / ClientNameIp | varchar(256) — not null |
| OperationStart / OperationEnd | timestamp with time zone — not null |
| OperationStatus | text — not null |
| OperationErrorCode | smallint — not null |
| OperationInfo | varchar |
| OperationHttpStatusCode | smallint default 0 — not null |
BiometricResultType
Fixed reference table listing every possible enrollment or verification result — for example, audio too loud, audio too short, successful match, mismatch.
Maintenance: None. Reference data.
| Field | Details |
| Id | integer generated by default as identity |
| Name / Description | text — not null |
| Abbreviation | char — not null |
| Order | integer — not null |
AuditAuthLog
Audit log of every voice biometrics API attempt — init enrollment, finalize enrollment, create identity, and so on.
Maintenance: Driven by security audit requirements and retention policy. Typically aligned with BiometricSession retention.
| Field | Details |
| CorrelationId / OperatorId / DeploymentId | uuid — not null |
| EventDate | timestamp with time zone — not null |
| Action | varchar(50) — not null |
| Outcome | text — not null |
| TargetUri | varchar(500) |
| TargetName / TargetId / InitiatorId / InitiatorType / CredentialType | varchar(50) |
AuditDataLog
Linked to AuditAuthLog, recording the before-and-after of changes — additions, amendments, and deletions.
Maintenance: Driven by security audit requirements and retention policy. Typically aligned with BiometricSession retention.
| Field | Details |
| CorrelationId / OperatorId / DeploymentId | uuid — not null |
| Action | text — not null |
| ChangeDate | timestamp with time zone — not null |
| Service | varchar(500) — not null |
| Table | varchar(50) — not null |
| EntryId | text — not null |
| Changes | varchar |
SYSTEM_LANGUAGE
Reference list of languages available to a voice biometrics deployment. Note: the configuration service maintains a separate system_language table for speech configuration; the two tables serve different services and should not be conflated.
Maintenance: None.
| Field | Details |
| ID | integer generated by default as identity |
| SYMBOL | varchar(10) — not null |
| NAME | varchar(30) — not null |
| PARENT_LANGUAGE_ID | integer |
Configuration Service
The configuration service stores the configuration profiles used by speech and voice biometrics deployments. Each deployment has one configuration element, with attributes attached to it.
configuration_element
One configuration element per deployment, identifying the configuration profile in use.
Maintenance: No regular maintenance, but the table should be included in routine backups.
| Field | Details |
| id | uuid — primary key |
| type | text (for example, "Speech") |
| name / description | text |
| status | text |
| language_id | integer |
| parent_configuration_id | uuid |
| deployment_id | uuid — not null — unique index |
configuration_attribute
Name/value attributes attached to a configuration element. Common names include sessionSettings and loggingSettings; values are JSON or string-encoded settings consumed by the platform services.
Maintenance: None.
| Field | Details |
| id | uuid — primary key |
| configuration_element_id | uuid — not null — FK to configuration_element(id) ON DELETE CASCADE |
| name | text |
| value | text |
| validation_class | text |
system_language (configuration service)
Reference list of languages available for speech configuration. Separate from the voice-biometrics SYSTEM_LANGUAGE reference table.
Maintenance: None.
| Field | Details |
| id | integer — primary key |
| symbol | text |
| parent_language_id | integer |
| name | text |
Deployment Service
The deployment service owns deployment metadata, encryption-key material that protects deployment data, post-processing profiles, and deployment-level admin settings.
deployment_data
Per-deployment configuration — connection strings, certificates, and similar material — stored encrypted at rest. Soft-deletes are retained for audit.
Maintenance: None. Deployments are added and removed through the admin portal; deleted rows are flagged with deleted_date rather than physically removed.
| Field | Details |
| deployment_id | uuid — primary key |
| data | bytea (encrypted) |
| metadata | bytea |
| creator | uuid — not null |
| created_date | timestamp with time zone default now() — not null |
| modifier / modify_date / deleted_date | uuid / timestamp with time zone |
deployment_master_key
Master keys used to wrap customer keys.
Maintenance: None. Automatically maintained by the platform's key management.
| Field | Details |
| id | uuid — primary key |
| hash / emergency_backup / encrypted_key | bytea |
| created_date | timestamp with time zone default now() — not null |
deployment_customer_key
One customer encryption key per deployment, wrapped by a master key. Used to encrypt the contents of deployment_data.data.
Maintenance: None. Operated automatically.
| Field | Details |
| id | uuid — primary key |
| deployment_id | uuid — FK to deployment_data(deployment_id) ON DELETE CASCADE |
| master_key_id | uuid — FK to deployment_master_key(id) ON DELETE CASCADE |
| encrypted_key | bytea |
| created_date | timestamp with time zone default now() — not null |
postprocessing_profile
Versioned post-processing profiles defined through the deployment portal — each row is a single version of a named profile, with the regex-driven post-processing operations stored as protobuf binary. The primary key is composite on (id, modify_date), so multiple historical versions of the same profile co-exist; the most recent version per (deployment_id, modify_date) is the active one.
Maintenance: None automatically. Historical versions accumulate; teams that revise profiles frequently may want to age out older versions per their own retention policy.
| Field | Details |
| id | uuid — not null (part of composite PK with modify_date) |
| deployment_id | uuid — FK to deployment_data(deployment_id) ON DELETE CASCADE |
| name | varchar(255) — not null |
| version | int — not null |
| description | text |
| regex_operations | bytea — not null (protobuf-encoded post-processing operations) |
| modify_date / created_date | timestamptz — not null — default now() |
deployment_admin_settings
Deployment-level feature flags and admin settings, stored as a protobuf binary blob. Each deployment has at most one row.
Maintenance: None.
| Field | Details |
| deployment_id | uuid — primary key — FK to deployment_data(deployment_id) ON DELETE CASCADE |
| settings | bytea — not null (protobuf-encoded settings) |
| creator | uuid — not null |
| created_date | timestamptz — not null — default now() |
| modifier / modify_date | uuid / timestamptz |
License Service
The license service uses a code-managed schema (rather than SQL migration files) and tracks its own schema version in migration_helpers. The current schema version is v2.
license_statuses
State submitted to and received from the cloud licensing service. Critical to the licensing phone-home function.
Maintenance: None.
| Field | Details |
| license_status_id | uuid — primary key — default gen_random_uuid() |
| cluster_guid | uuid — not null |
| sync_time | timestamp with time zone — not null — default current_timestamp |
| reported / response / response_signature | text — not null |
license_usage_counters
Per-deployment usage counters. The platform maintains two binary-encoded columns side-by-side: license_usage (the legacy uint32 format, retained for backward compatibility with older service versions) and license_usage_v2 (the current uint64 format, used from schema v2 onward). Both columns may be populated during transition; current services read and write license_usage_v2.
Maintenance: Can be aged out following the same retention rules as the session tables — but the data is required by the licensing phone-home function, so do not aggressively prune.
| Field | Details |
| deployment_id | uuid — primary key |
| license_usage | bytea (legacy uint32 format — backward compatibility only) |
| license_usage_v2 | bytea (current uint64 format — added schema v2) |
| date_stored | timestamp (no time zone — intentional) |
migration_helpers
License service's schema migration ledger. One row per migration attempt; active = true indicates an in-progress migration, used as a startup-coordination lock.
Maintenance: None.
| Field | Details |
| migration_guid | uuid — primary key — default gen_random_uuid() |
| from_ver | integer — nullable |
| to_ver | integer — not null |
| start_time | timestamp with time zone — not null — default current_timestamp |
| active | boolean — not null — default true |
Per-Service Migration Tables
Most services use the Bun ORM and create two PostgreSQL tables for migration management:
bun_migrations— one row per applied migration. Used to determine which migrations have already run on this database.bun_migration_locks— serializes the migration process across service replicas at startup.
These tables exist independently in each Bun-using service's database (archive, configuration, deployment). The license service uses its own migration_helpers ledger instead (documented above).
Maintenance: None.
Upgrade Artifacts
Installs that originally ran on v4.x or earlier and have since upgraded may still carry a small number of legacy CamelCase tables that the v5 upgrade migration read from but did not drop: CONFIGURATION_ELEMENT, CONFIGURATION_ATTRIBUTE, DeploymentData, MasterKeys, CustomerKeys, DefaultDeploymentData, and EmergencyPublicKeys. These are not used by current services and can be dropped once the operator has confirmed that the corresponding snake_case tables documented above hold the migrated data. Fresh installs from v5 onward never had these tables.
See Also
- Cleanup scripts for Postgres and MongoDB databases — the operational SQL and JavaScript that act on these tables.
