HxDBMigrate migrates an external source database into Velaris. It connects read-only to a customer database, discovers its structure, understands what the data means (semantic classification + PII/compliance scan), generates draft Velaris case-types from workflow tables, migrates the rows into cases, keeps them in sync while the source stays live, cuts over with one click (and a rollback window), and closes with a signed Compliance Migration Certificate. Open-source relational sources only: PostgreSQL, MySQL, MariaDB.
| Phase | What it does | Output |
|---|---|---|
| 1 — Connect | Registers a read-only source database. The connection is tested before it is saved; credentials are encrypted at rest (HxVault) and never returned by the API. | A saved, testable source |
| 2 — Discover | Introspects the schema and (deep scan) samples values to classify each column and flag PII/PHI. | Schema Autobiography, data-quality score, semantic + compliance report |
| 3 — Generate | Turns a workflow table (one with a status/lifecycle column) into a draft Velaris case-type. Reviewed by a human, then applied. | Draft definition_json → a real case-type |
| 4 — Migrate | Copies source rows into Velaris cases of the target case-type — paged, bounded, PII-aware, with a dry-run preview. Every migrated row is linked (source row → case), so re-runs skip what is already migrated. | Velaris cases + a migration-run record + row links |
| 5 — Sync | The polling Migration Twin: the source keeps running while incremental passes bring new rows in as cases and update the linked case when a source row changes (checksum-detected). The same PII gate applies to every pass. Until cutover the source is the system of record — a sync pass overwrites case-data edits made in Velaris for rows that changed at the source. | Live coverage per table + a Migration Health Score (0–100) |
| 6 — Cutover | One click: a final delta sync, then the source is frozen and Velaris becomes the system of record. Inside the rollback window (72h default) one click cancels every migrated case and unfreezes the source — it was never written to, so rolling back really is that simple. | A frozen source, a rollback window, an audit trail |
| 7 — Certificate | A signed Compliance Migration Certificate: discovery findings, the PII actions actually taken per run, the full run history, and table-to-case-type lineage — SHA-256 signed with the platform key, downloadable as PDF. | A board-presentable, tamper-evident artefact |
| Source | Driver | Notes |
|---|---|---|
| PostgreSQL | asyncpg | Version upgrade / consolidation |
| MySQL | aiomysql | MySQL 8+ |
| MariaDB | aiomysql | MariaDB 10.6+ / 11.x |
A discovery analysis produces three things a human can act on:
j***@***, ***1111) — never a raw value.Only a BPM platform can do this: a source table that looks like a workflow — one with a status/lifecycle column — becomes a draft Velaris case-type. The status column's values become stages (e.g. PENDING > APPROVED > DISPATCHED), and the table's columns become case fields with types inferred from the discovery (email → email field, an enum → a select, a date column → a date field). The draft is always reviewed by a human before it is applied, and applying it goes through the standard, privilege-checked case-type create path.
The final phase copies source rows into Velaris cases of the target case-type. It reads a bounded, paged window (read-only) and creates cases with a lean insert that deliberately does not fire business rules or webhooks — a historical import must never trigger live automation. Always run a dry run first to preview the mapping.
| PII mode | Behaviour |
|---|---|
safe (default) | High-sensitivity columns flagged for tokenize (credit cards, SSNs) are not copied. Ordinary customer PII (email, name, phone) is migrated — it is the data you are deliberately moving. |
exclude_all | Every compliance-flagged column is dropped. |
as_is | Every column is copied verbatim (you explicitly accept moving raw PII into Velaris). |
Open Studio > HxDBMigrate. Under Connect a source database, enter the connection details, choose the type (PostgreSQL / MySQL / MariaDB) and an SSL mode, then click Test & Add.
In Sources, enable Deep scan and click Analyze. Review the data-quality score, the Compliance table (masked PII), and the Schema Autobiography.
Under Generate case-types from workflow tables, pick a candidate and click Generate. Review the draft stages and fields, then click Apply to create the case-type.
In the Migrate data panel, choose a PII mode and a row limit, keep Dry run checked, and click Preview. Confirm the excluded columns and sample fields.
Uncheck Dry run and click Migrate rows. The migrated cases appear under the new case-type in Case Manager.
While the old system is still in use, click Sync now whenever you want to pull in changes — new rows become cases, changed rows update their linked case. Sync status shows per-table coverage and the Migration Health Score. Hold off working the migrated cases until cutover: while syncing, the source is authoritative and overwrites case-data edits for rows that changed.
When the score satisfies you, click Cutover. A final delta sync runs, the source freezes, and the rollback window opens. If anything is wrong, Rollback cancels every migrated case and unfreezes the source; otherwise Complete (or the window expiring) makes it final.
Click Certificate to download the signed Compliance Migration Certificate PDF for your records.
# 1. Register a source (tested before it is saved; credentials encrypted) curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/sources \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"name":"legacy-crm","source_type":"mariadb","host":"db.internal","port":3306, "database":"crm","username":"reader","password":"...","ssl_mode":"require"}' # 2. Deep discovery analysis (semantic + PII/compliance) curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/analyze \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"deep": true, "ai": false}' # 3. Generate a draft case-type from a workflow table, then apply it curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/generate-case-type \ -H "Authorization: Bearer $TOKEN" -d '{"table": "orders"}' curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/apply-case-type \ -H "Authorization: Bearer $TOKEN" \ -d '{"name":"Orders","version":"1.0.0","definition_json": { ... }}' # 4. Migrate rows into cases (dry-run first; safe PII mode) curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/migrate \ -H "Authorization: Bearer $TOKEN" \ -d '{"table":"orders","case_type_id":"...","limit":100,"dry_run":true,"pii_mode":"safe"}' # 5. Keep syncing while the source stays live, and watch the health score curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/sync \ -H "Authorization: Bearer $TOKEN" -d '{"table":"orders","case_type_id":"..."}' curl -s http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/sync-status \ -H "Authorization: Bearer $TOKEN" # 6. One-click cutover (final delta sync + freeze); rollback stays open 72h curl -s -X POST http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/cutover \ -H "Authorization: Bearer $TOKEN" -d '{}' # 7. The signed Compliance Migration Certificate (JSON or PDF) curl -s "http://localhost:8200/api/v1/hxdbmigrate/sources/{id}/certificate?fmt=pdf" \ -H "Authorization: Bearer $TOKEN" -o migration-certificate.pdf