Skip to main content

Crate mz_deploy

Crate mz_deploy 

Source
Expand description

Safe, testable deployments for Materialize.

mz-deploy compiles a directory of .sql files into a deployment plan, diffs it against the live environment, and executes blue/green schema migrations via Materialize’s zero-downtime deployment primitives.

§Architecture

The crate is organized into four major layers:

  • cli — Command-line interface: argument parsing, subcommand dispatch, and user-facing error formatting.
  • client — Database client layer: connection management, introspection queries, DDL provisioning, and deployment operations against a live Materialize region.
  • project — Project compiler: loads .sql files from disk, validates and type-checks them, resolves dependencies, and produces a deployment graph.
  • types — Data-contract system: the types.lock file that pins column schemas for external dependencies and the mirrored internal type cache used by downstream consumers.

§Supporting Modules

Modules§

cli
Command-line interface for mz-deploy.
client
Database client layer for communicating with a Materialize region.
config
Configuration loading for profiles and project settings.
log
Logging utilities for mz-deploy.
lsp
LSP server for mz-deploy projects.

Macros§

info
Print an informational message to stderr. Silenced by --quiet.
info_nonl
Print an informational message to stderr without a trailing newline. Silenced by --quiet.
verbose
Print a message only when verbose mode is enabled.