Reference

The fourteen-phase deployment.

Most converters deploy in catalog order and fail on the first dependency loop. Trekport resolves dependencies up front and deploys in this exact sequence. Each phase is retryable. Each phase emits a typed report.

Phase sequence

#PhaseWhat it does
01Pre-flightValidate connectivity, version skew, and target capacity. Surface blocking issues before any DDL runs.
02Compatibility extensionsInstall the compatibility layer so every downstream conversion can rely on it.
03Schemas and rolesMaterialize the namespace and identity surface. Grants apply later in dependency order.
04TypesDomain, composite, and collection types deploy before tables that reference them.
05SequencesSequences land before tables so identity columns wire correctly on first deploy.
06TablesTables deploy without foreign keys. FKs attach in the final phase to avoid circular dependencies.
07IndexesAll non-constraint indexes, including functional, partial, and trigram indexes.
08Standalone functions and proceduresFunctions and procedures with no package wrapper. Resolved in call-graph order.
09PackagesPackage spec and body translated to schema-plus-functions. Cross-package references resolve through the dependency graph.
10TriggersRow-level, statement-level, INSTEAD OF, and compound triggers. After every referenced object exists.
11Views and materialized viewsMulti-pass deploy for view-on-view chains. Refresh strategies preserved.
12SynonymsPublic synonyms reconciled to PostgreSQL search paths. Private synonyms emitted as views where applicable.
13Grants and role membershipsObject grants, column grants, and role memberships in dependency order. Cascade-aware to avoid noise.
14Foreign keys and validationConstraints applied last. Row counts, checksums, and sample-row equivalence checked. Failure here aborts cutover.

Retry semantics

Phases are independently retryable. A failed phase can be re-run after the underlying issue is resolved. The orchestrator detects already-deployed objects and skips them without manual cleanup. Idempotent phase semantics are part of the contract, not a future feature.

  • Within a phase, dependent objects retry across passes until the phase converges or exceeds the configured pass limit.
  • Transient connection errors are retried with exponential backoff before being surfaced. Only transient classes are retried at this layer; classified failures route to the classifier.
  • On clean re-run against an already-deployed target the report shows zero changes.

Per-phase reports

Each phase emits a typed status into the deployment report. Reviewers can audit the run object by object without leaving the report.

FieldMeaning
attemptedTotal objects the phase tried to deploy.
deployedObjects that landed cleanly on the target.
retriedObjects that failed at least one pass before succeeding.
deferredObjects deferred to a later phase by the dependency resolver.
classifiedFailures bucketed by the classifier (converter / catalog / extension / out-of-scope).

Skipping phases

The CLI accepts --phases with a comma-separated phase list for partial deploys against staging environments. The full sequence is the supported path to production.

Related reading