The Migration Journey

[ 1. Connect ] > [ 2. Discover ] > [ 3. Generate ] > [ 4. Migrate ] > [ 5. Sync ] > [ 6. Cutover ] > [ 7. Certificate ] Read-only Autobiography Draft case-type Rows > cases Source stays Final delta, Signed proof: source + quality score from a workflow (paged, PII- live; changes freeze, 72h discovery, PII (SSRF-guarded, + semantic + PII table (status > aware, dry-run flow into the rollback actions, runs, creds encrypted) compliance scan stages) first) linked cases window lineage

Phase Details

PhaseWhat it doesOutput
1 — ConnectRegisters 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 — DiscoverIntrospects the schema and (deep scan) samples values to classify each column and flag PII/PHI.Schema Autobiography, data-quality score, semantic + compliance report
3 — GenerateTurns 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 — MigrateCopies 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 — SyncThe 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 — CutoverOne 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 — CertificateA 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

Supported Sources

SourceDriverNotes
PostgreSQLasyncpgVersion upgrade / consolidation
MySQLaiomysqlMySQL 8+
MariaDBaiomysqlMariaDB 10.6+ / 11.x
Open-source relational engines only. SQL Server and Oracle are out of scope (their proprietary client libraries cannot be bundled into a self-hosted, open-source distribution), as are MongoDB and other non-relational stores.

Discovery & Compliance

A discovery analysis produces three things a human can act on:

Privacy by design. Sampled values are used only in memory. The stored report and API contain classifications, counts, and masked examples (e.g. j***@***, ***1111) — never a raw value.

Case-Type Generation

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.

Data Migration

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 modeBehaviour
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_allEvery compliance-flagged column is dropped.
as_isEvery column is copied verbatim (you explicitly accept moving raw PII into Velaris).

Running a Migration in Studio

  1. 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.

  2. In Sources, enable Deep scan and click Analyze. Review the data-quality score, the Compliance table (masked PII), and the Schema Autobiography.

  3. 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.

  4. 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.

  5. Uncheck Dry run and click Migrate rows. The migrated cases appear under the new case-type in Case Manager.

  6. 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.

  7. 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.

  8. Click Certificate to download the signed Compliance Migration Certificate PDF for your records.

API Reference

# 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
Generated case-types and migrated data are a starting point. Review the draft stages, fields, and the discovery warnings before applying, and always run a dry-run migration first. Connecting requires an administrator; creating a case-type honours the standard case-type write privileges.