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.sqlfiles from disk, validates and type-checks them, resolves dependencies, and produces a deployment graph.types— Data-contract system: thetypes.lockfile 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.
- diagnostics 🔒
- Source-positioned diagnostics decoupled from any output format.
- docker_
runtime 🔒 - Docker runtime for managing a persistent Materialize container.
- fs 🔒
- Filesystem abstraction with optional in-memory overlays.
- log
- Logging utilities for mz-deploy.
- lsp
- LSP server for mz-deploy projects.
- project 🔒
- Project compilation, graph assembly, and deployment analysis.
- secret_
resolver 🔒 - Client-side secret resolution for mz-deploy.
- types 🔒
- Data-contract system for external dependencies.