Docs/Configuration/zero_downtime
ProEnterprise

zero_downtime

Settings for the safe-rewrite path, where a change that would lock a table is generated instead as a backfill that runs in bounded passes. The rewriter is used by Pro diff --generate-sql. Enterprise plan reports the same rewrite as advisory plan.safe_rewrite findings. enforce and allow_drops gate that generated script.

Keys

KeyDefaultWhat it does
enforcefalseWhen true, Pro diff --generate-sql still renders an operation that has no safe form on the engine, and attaches a blocking finding for a person to clear. That finding exits 5.
allow_drops—Object classes a desired-model diff may drop: tables, columns, constraints, indexes, views, sequences, triggers, procedures, functions, other. Enterprise diff --desired-model.
batch_size5000Rows per pass in a batched backfill. Must be at least 1. The --batch-size flag overrides it.
min_table_rows0Row count below which a table needs no online rewrite. Accepted and validated; not yet consumed by the rewriter.
backfill_stylerepeatableShape of the backfill. Only repeatable is implemented — a bounded UPDATE re-run until it changes no rows.
yaml
zero_downtime: enforce: true allow_drops: [views, indexes] batch_size: 5000 backfill_style: repeatable

Drops

Enterprise diff --desired-model withholds every DROP unless you pass --allow-drops. The flag renders only the classes in allow_drops. With no allow_drops key, every class is eligible, and tables and columns still need a named approver:

dblift diff --desired-model snapshots/desired.json --allow-drops --approved-by release-bot --generate-sql

--approved-by NAME is recorded. It is not checked as an identity. PostgreSQL scripts no longer append CASCADE to a generated DROP TABLE or DROP FUNCTION, so a dependent object that is not in the script blocks the drop instead of being removed with it.

An invalid value is rejected when the file loads rather than when the rewrite runs: batch_size below 1, a negative min_table_rows, or a backfill_style other than repeatable each fail immediately.

On this page