molt verify
Compares source and target databases for schema (DDL) and row (data) consistency. Run after molt fetch to confirm migration integrity.
Basic Structure
Verification Phases
Phase 1 — Schema: Compares table presence, columns, types, NOT NULL constraints, and primary key structure.
Phase 2 — Rows (default, --rows=true): Iterates source rows in PK order and compares against target. Reports missing, extraneous, and mismatched rows per shard.
Modes
Concurrency & Sharding
Sharding splits a table's PK range across workers. Supported PK types: INT, FLOAT, DECIMAL, UUID. Falls back to a single full-scan for unsupported types.
Common Workflows
1. Post-migration sanity check
2. Schema-only (CI gate)
3. Filtered verification (subset of tables)
4. Verify with column exclusions
Source-Specific Prerequisites
PostgreSQL: No special requirements. Partition tables (child partitions) are not supported — remove them before verifying.
MySQL: Queries current database only. ONLY_FULL_GROUP_BY may affect queries; disable if issues arise.
Oracle: Binary must be built with CGO_ENABLED=1 -tags="cgo source_all". Oracle Instant Client in LD_LIBRARY_PATH. Use --source-cdb for multi-tenant (CDB) setups. Selective data verification (--filter-path) is not supported.
Output & Reporting
Each table prints a summary per shard:
- missing: rows present on source but absent on target
- extraneous: rows on target with no match on source
- mismatch: rows present on both but values differ
Schema issues (missing/extra tables or columns, type mismatches, PK differences) are logged as warnings and do not stop row verification.
Prometheus metrics available at --metrics-listen-addr (default 127.0.0.1:3030).
Error Recovery
Gotchas
- Schema changes between source and target after migration are not automatically reconciled — fix schema first, then re-run
--concurrencyvalues exceeding 4× CPU count trigger a warning and may degrade performance- Row verification requires primary keys on both source and target tables; tables without PKs are skipped for row comparison
--filter-path(selective row filters) is not supported for Oracle sources- Log files contain sensitive query data; avoid
--show-connection-loggingin production logs - After fetch, always run verify before cutover to confirm data integrity
See flags reference [blocked] for the full flag list.


