MySQL DDL Audit Tool for Safer Schema Changes

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.

How it works

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

Why audit MySQL DDL before shipping

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.

Common MySQL DDL checks

Use in CI

# 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.

MySQL schema change review for teams

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.

What DeltaScope is not

Frequently asked questions

Does DeltaScope need to connect to my MySQL database?
No. The default mode is offline-first. It parses the SQL text and evaluates rules without any network connection. An optional metadata-aware mode can use read-only table statistics if you provide connection details.
Which MySQL DDL statements does it cover?
CREATE TABLE, ALTER TABLE (add/drop/modify column, rename, change charset, add/drop index), DROP TABLE, TRUNCATE TABLE, CREATE VIEW, and more. See deltascope rules for the full list.
Can I customize the rules?
Yes. Every rule has a configurable severity level (blocker, warning, notice) and optional parameters. Override via a YAML config file and pass it with --config.
Does it support TiDB?
Yes. Use --dialect tidb to switch to TiDB-specific parsing and rules. The same CLI, CI, HTTP, and MCP integrations work for both MySQL and TiDB.
How is this different from pt-online-schema-change or gh-ost?
Those tools execute schema changes online. DeltaScope does not execute any SQL. It reviews the SQL text for risk patterns before execution, complementing online DDL tools.