# DBLift

> Python-native database migration and release safety tool that previews SQL, validates migration history, catches SQL risks in PRs, and produces auditable release evidence.

DBLift is a Python-native database migration and release safety toolkit licensed under Apache 2.0. It installs via pip, integrates with SQLAlchemy, Django, FastAPI, Flask, and pytest, and covers the full migration lifecycle — from previewing SQL before it runs to retaining auditable release evidence for approvers. The open core is free; Pro and Enterprise tiers add SQL review, schema comparison, offline planning, and compliance reporting.

## What It Is

DBLift is a database change management tool built specifically for Python teams. Where most migration tools require a JVM or operate outside the Python workflow, DBLift runs as a CLI and Python API (`DBLiftClient`, `AsyncDBLiftClient`) that fits directly into the same CI jobs and test suites as application code. Its core job is to make database releases as safe and reviewable as application code releases: show exactly what SQL will run, validate migration state, catch risky SQL patterns before merge, and keep evidence that approvers can read.

## How the Tier Model Works

DBLift structures its capabilities across three explicit tiers, each targeting a different release risk:

- **OSS Core (Apache 2.0):** Full migration lifecycle — `migrate`, `undo`, `info`, `validate`, `baseline`, `repair` — with dry-run and show-sql previews, SQL and Python migration scripts, and support for 20 database engines. No license key required.
- **Pro:** Adds SQL Review (`validate-sql`) with dialect-aware static analysis, schema comparison (`diff`), schema export (`export-schema`), Impact Analysis, and Audited Data Fixes with a hash-chained ledger. Delivered as a commercial archive with named-contributor seats.
- **Enterprise:** Adds Portable Snapshots, Offline Planning (`plan`), Deployment Rehearsal (`preflight` with container replay and rollback rehearsal), Policy Packs, external secrets manager integrations (AWS Secrets Manager, Azure Key Vault, Google Secret Manager, HashiCorp Vault), Guaranteed Undo for data corrections, and HTML/JSON/SARIF compliance report bundles.

## Database Coverage

DBLift's open core supports 20 engines across traditional RDBMS, PostgreSQL-compatible clouds, and analytics targets:

- **Native plugins:** PostgreSQL, MySQL/MariaDB, Oracle, SQL Server, DB2, SQLite, DuckDB, Azure Cosmos DB, Amazon Redshift, CockroachDB
- **PostgreSQL-compatible variants:** Neon, Supabase, Amazon Aurora PostgreSQL, Google AlloyDB, YugabyteDB, TimescaleDB, Citus
- **NoSQL (Python migrations only):** Azure Cosmos DB, MongoDB

Diff and sync depth vary by dialect and tier. NoSQL targets require Python migration scripts; SQL migrations against those engines fail with a documented error code.

## Python Integration and Workflow Fit

DBLift is designed to live inside the application stack rather than alongside it. Key integration points include:

- `DBLiftClient.from_sqlalchemy(engine)` and `AsyncDBLiftClient` for programmatic use
- Django management commands and a pending-migrations system check
- FastAPI lifespan helpers that block app startup on unapplied migrations
- Flask app-factory wiring and a `flask dblift-migrate` CLI command
- OpenTelemetry instrumentation emitting spans for `migrate`, `undo`, and related commands
- `pytest-dblift` for fixture-based migration testing

Configuration follows a clear precedence: CLI flags override environment variables, which override `dblift.yaml`, which overrides values embedded in the database URL.

## Update: DBLift 3.10.1

The latest release as of the GitHub repository is **v3.10.1**, published 2026-08-25, described as a "MATERIALIZED VIEW LOG name-extraction fix." The repository was created in June 2026 and shows active development with the last push recorded 2026-08-27. The features page lists version 3.7.0 in CLI output examples, indicating rapid iteration across minor versions. The project is hosted under the `dblift` GitHub organization and tracks database, schema, and versioning topics.

## Features
- Python-native CLI and API for database migrations
- Dry-run and show-sql previews before applying changes
- SQL and Python migration scripts in one history
- Undo/rollback to target version
- validate-sql static SQL analysis with dialect-aware rules (Pro)
- Schema comparison and drift detection (Pro)
- Schema export for brownfield onboarding (Pro)
- Audited Data Fixes with hash-chained ledger (Pro)
- Portable Snapshots and Offline Planning (Enterprise)
- Deployment Rehearsal with container replay (Enterprise)
- HTML/JSON/SARIF compliance report bundles (Enterprise)
- Policy Packs and CI enforcement (Enterprise)
- External secrets manager integrations: AWS, Azure, GCP, HashiCorp (Enterprise)
- Guaranteed Undo for data corrections (Enterprise)
- Support for 20 database engines
- Django, FastAPI, Flask, SQLAlchemy, and pytest integrations
- OpenTelemetry instrumentation
- Tag filtering for selective migration deployment
- Flyway migration history import
- GitHub Actions, GitLab CI, and SARIF output formats

## Integrations
PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, DB2, SQLite, DuckDB, Azure Cosmos DB, MongoDB, Amazon Redshift, CockroachDB, Neon, Supabase, Amazon Aurora PostgreSQL, Google AlloyDB, YugabyteDB, TimescaleDB, Citus, SQLAlchemy, Django, FastAPI, Flask, pytest, OpenTelemetry, GitHub Actions, GitLab CI, AWS Secrets Manager, Azure Key Vault, Google Secret Manager, HashiCorp Vault

## Platforms
WINDOWS, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source, Free tier available

## Version
v3.10.1

## Links
- Website: https://dblift.com
- Documentation: https://docs.dblift.com/
- Repository: https://github.com/dblift/dblift
- EveryDev.ai: https://www.everydev.ai/tools/dblift
