DeltaScope is an offline-first MySQL DDL audit tool and MySQL migration risk checker that analyzes schema change statements before they reach a database. It catches destructive ALTER TABLE operations, missing defaults, charset mismatches, and dozens of other risky patterns in CI pipelines, developer workflows, and AI agent sessions.
Pass one or more DDL statements to DeltaScope. It parses the SQL, evaluates every applicable rule, and returns a verdict with blockers, warnings, and notices. No database connection is needed.
$ deltascope audit --sql "ALTER TABLE users DROP COLUMN age;"
Verdict: reject
Statements: 1
Blockers: 1
Warnings: 0
Notices: 0
Statement 1: ALTER TABLE
- [blocker] ddl.alter.drop.column: dropping column "age" is a destructive change
Schema changes are among the riskiest operations in production databases. A missing WHERE clause in an ALTER TABLE or an unintended DROP COLUMN can cause data loss, downtime, or application errors. DeltaScope checks your DDL statements offline so you catch problems early in the development cycle.
# GitHub Actions example
- name: Audit SQL migrations
run: |
deltascope audit \
--file ./migrations/20260409_drop_column.sql \
--format github-actions \
--fail-on blocker
DeltaScope also supports --format sarif for GitHub Code Scanning and --format gitlab-codequality for GitLab CI.
Run DeltaScope locally, in CI, via HTTP service, or through an MCP server for AI agents. Every integration path uses the same audit engine and the same policy configuration.
deltascope rules for the full list.--config.--dialect tidb to switch to TiDB-specific parsing and rules. The same CLI, CI, HTTP, and MCP integrations work for both MySQL and TiDB.