Database Migrations Made Simple
Take the stress out of schema changes. Inspect, diff, and apply changes with plain SQL, like Terraform but for your database.
Initializing demo...
- Language
- Plain SQL
- Approach
- Declarative
- Privacy
- Fully local
[ 02 ] Why
Why Migrata
When a migration fails halfway through, you're left guessing what state the database is in and how to recover. Migrata treats your SQL schema as the source of truth and diffs it against your live database so you always know what changed and can re-apply safely.
Always know the database state
Define the entire database state in plain SQL instead of scattering intent across hundreds of migration files. The schema in source control reflects what the database should look like, clearly and unambiguously.
Recover safely when migrations fail
When a migration breaks midway, there's nothing to unwind or repair by hand. Re-apply the schema and Migrata brings the live database to the desired state by applying only what's missing.
Easy rollbacks through source control
Undoing a schema change is as simple as reverting the schema and re-applying it. There are no down migrations to write or fragile rollback paths to maintain.
Stop hoarding migration files
Stop accumulating hundreds of one-off migration scripts that obscure the real schema. Migrata derives changes from the declarative schema itself, eliminating drift and long-term maintenance noise.
[ 03 ] Features
Everything you need for safe migrations
Migrata CLI provides a complete toolkit for managing database schema changes with confidence and control. Currently supports PostgreSQL.
Schema Inspection
Export schemas from a live database to local SQL files, including tables, indexes, and constraints.
Intelligent Diffing
Compare any two schema sources: live databases, SQL files, directories, or remote URLs
Safe Execution
Preview all schema changes before applying with interactive approval. Auto-approve with --approve for automated CI/CD runs
Impact Analysis
See all downstream components that depend on modified entities before applying changes
Additional Capabilities
Plain SQL
Write changes in plain SQL statements that your team already understands. No proprietary languages required
Risk Classification
Every migration plan is labeled Safe, Warning, or Destructive so you can assess impact before applying
Dev-Database Validation
Test schema changes against an ephemeral Docker container with --dev-image to catch runtime errors early
Multi-Step Migrations
Automatically handles risky operations with temporary columns, data updates, and safe renaming
Config-First Workflow
Store reusable CLI commands in version-controlled YAML/JSON files. Share configs to ensure team consistency across environments
Fully Local
Schemas and data never leave your machine; all operations run locally in the CLI
[ 04 ] How It Works
Your migration workflow, simplified
Simplify your database migration workflow in four simple steps. Inspect schemas, version them in Git, make changes, and apply migrations safely.
Sync your schema from a live database
Pull your current database schema into local SQL files. This gives you a complete snapshot of your database structure that you can version control.
$ migrata schema inspect \
--from "postgresql://localhost:5432/mydb" \
--to ./schema
Sync your schema from a live database
Pull your current database schema into local SQL files. This gives you a complete snapshot of your database structure that you can version control.
$ migrata schema inspect \
--from "postgresql://localhost:5432/mydb" \
--to ./schema
Commit your schema to version control
Check your schema files into Git alongside your application code. Now your database schema is versioned and part of your development workflow.
$ git add schema/
$ git commit -m "Initial schema snapshot"
$ git push origin mainCommit your schema to version control
Check your schema files into Git alongside your application code. Now your database schema is versioned and part of your development workflow.
$ git add schema/
$ git commit -m "Initial schema snapshot"
$ git push origin mainMake changes to your schema files
Edit your ddl statements directly to add columns, modify types, or adjust constraints. Migrata diffs these files against your live database to generate the actual migration steps.
CREATE TABLE public.users (
id UUID PRIMARY KEY NOT NULL,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL, -- Added column
created_at TIMESTAMP DEFAULT now()
);Make changes to your schema files
Edit your ddl statements directly to add columns, modify types, or adjust constraints. Migrata diffs these files against your live database to generate the actual migration steps.
CREATE TABLE public.users (
id UUID PRIMARY KEY NOT NULL,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL, -- Added column
created_at TIMESTAMP DEFAULT now()
);Review and apply your migration
Run diff to compare your local changes against the live database. Migrata shows you exactly what will change and prompts for interactive approval before applying.
$ migrata diff \
--from "postgresql://localhost:5432/mydb" \
--to ./schema
Review and apply your migration
Run diff to compare your local changes against the live database. Migrata shows you exactly what will change and prompts for interactive approval before applying.
$ migrata diff \
--from "postgresql://localhost:5432/mydb" \
--to ./schema
[ 06 ] Roadmap
Where we're headed
Building the next generation of database migration tools. Here's what we're working on and what's coming next.
CLI: Core Release
CurrentRelease of the CLI with full PostgreSQL support, schema inspection, and intelligent diffing.
CI/CD Integration
Official GitHub Actions support for automated migrations and PR previews.
Expanded Dialect Support
Add support for MySQL, Microsoft SQL Server, Oracle, and SQLite
[ 07 ] Pricing
Free tier
The CLI is free to use. Right now it supports PostgreSQL, with more dialects on the way.
Free Plan
Perfect for solo developers
- Optional account access
- Unlimited devices
- PostgreSQL support
[ 08 ] Get Started
Stop worrying. Start migrating.
Migrata CLI gives you the freedom to evolve your database schema with confidence. Make changes, roll them back, and iterate without worrying about manual migration files.