Skip to content

Message Codes

splaxtr edited this page Aug 26, 2026 · 1 revision

Message Codes

Every message the engine produces carries three things: a Kind (Info, Warning, Error, Success, Step), an English Text, and — for every message born inside the engine — a stable Code plus the Args that were interpolated into it. The code and args are the message expressed as data.

The contract:

  • Text is always English and is the only field a consumer has to understand.
  • A presentation layer translates by code and falls back to Text when it has no translation. The engine itself has no notion of locale — it reports what happened, not how to word it. (The bundled UI ships a Turkish dictionary in app.js as the reference implementation.)
  • Codes are a wire format. Renaming one silently drops a translation back to English — add a new code rather than repurposing an old one.
  • {0}, {1} … in the templates correspond to Args in order. Translations may reorder them; they may not invent new ones.
  • A message with no code carries text from outside the engine (a driver exception) and is shown as-is.

The definitive list lives in MessageCode.cs.

Steps

CodeEnglish text
step.readingSchemasReading schemas
step.preflightPreflight
step.copyingCopying data
step.verifyRowCountsVerifying row counts
step.verifyForeignKeysVerifying foreign key integrity

Plan

CodeEnglish text
info.tablesToMigrate{0} tables to migrate.
error.noTablesToCopyNo tables to copy — the source/target may be wrong, or the target has no schema.
error.columnNotSynthesizable{0}.{1}: missing from the source, NOT NULL, and no safe default can be synthesized ({2}).
warn.sourceOnlyTableSource table '{0}' does not exist in the target — its data will not be migrated.
error.sourceOnlyTable…same, plus: If this is intentional, enable the 'allow source-only tables' option.

Preflight

CodeEnglish text
info.preflightCleanPreflight clean: no NULL/length mismatches.
error.preflightNulls{0}.{1}: target is NOT NULL but the source has {2} NULLs.
error.preflightLength{0}.{1}: target is varchar({2}) but the longest source value is {3} characters.
warn.preflightAllowedProceeding because the risk was accepted — the copy may still fail midway.

Copy

CodeEnglish text
info.tableCopied{0}: {1} rows
info.copyFinishedCopy finished — {0} rows.
info.sequencesAligned{0} identity sequences aligned.
warn.truncateCascadeTRUNCATE CASCADE also emptied {0} dependent tables: {1}. Tables with no source counterpart stay empty.
warn.truncateCascadeMore…same, with a (+{2} more) tail when more than eight tables cascaded.
error.zeroRowsNo rows were copied; the source is empty or wrong. Nothing was committed.

Verification

CodeEnglish text
info.rowCountsMatchAll row counts match.
error.rowCountMismatch{0}: source has {1} rows, target has {2}.
info.foreignKeysClean{0} foreign keys checked, no orphan rows.
error.orphanRowsOrphan rows: {0} ({1}) → {2}: {3} rows ({4}).
error.verifyFailedRollbackVerification failed — rolling back, the target was not written.

Target database

CodeEnglish text
error.targetDbNameMissingThe target connection string has no database name.
info.targetDbExistsTarget database '{0}' already exists — left untouched.
success.targetDbCreatedTarget database '{0}' created.
success.targetDbCreatedCollationTarget database '{0}' created (collation: {1}).
info.collationVerifiedCollation verified: {0}
warn.collationMismatchAllowedTarget collation is '{0}' — expected ICU '{1}'. Proceeding because the mismatch was allowed.
error.collationMismatchTarget collation is '{0}' — expected ICU '{1}'. A wrong collation is silent: search and sort quietly misbehave.

PostgreSQL notices

CodeEnglish text
info.postgresNotice(pg) {0}

Outcomes

The final verdict of a run, carried on the result as well as the last progress line:

CodeEnglish text
success.migrated{0} rows migrated and verified.
success.verifyPassedVerification passed.
fail.collationMismatchCollation mismatch.
fail.schemaMismatchSchema mismatch — details above.
fail.emptyIntersectionEmpty intersection.
fail.verifyFailedVerification failed.
fail.preflightUnresolvedPreflight mismatches were not resolved.
fail.zeroRowsZero rows.
fail.targetDbNotReadyThe target database could not be prepared.
fail.exceptionThe migration stopped with an exception.

Tokens

Two sentinel values arrive as arguments yet still need translating — a collation the server would not reveal. The double @ marks them: no ICU locale or PostgreSQL collation name begins with one, so a presentation layer can translate them on sight without risking a collision with real data.

TokenMeaning
@@unknownThe value was absent (server returned nothing)
@@unreadableThe value could not be read at all

Clone this wiki locally