Database Migration Generator
Compare two SQL schema definitions and generate migration scripts with ALTER TABLE, ADD COLUMN, DROP INDEX, and other DDL statements.
Something went wrong
More options
How to use Database Migration Generator
- Paste the old (current) schema SQL.
- Paste the new (target) schema SQL.
- Click Generate Migration.
- Review and copy the generated migration script.
What is Database Migration Generator?
A database migration generator compares two versions of a SQL schema and generates the DDL statements needed to transform the old schema into the new one. It detects added, removed, and modified columns, indexes, and constraints.
This tool supports MySQL and PostgreSQL dialects. It generates clean, ordered migration scripts that can be used with migration tools like Flyway, Liquibase, or Knex.js.
FAQ
- What changes are detected?
- Added/removed tables, added/removed/modified columns, added/removed indexes, and constraint changes.
- Is the migration reversible?
- The tool generates both up and down migration scripts when possible.
Related tools
People also use
- CSV to SQL📊 CSV Tools
Convert a CSV to SQL INSERT statements for MySQL, PostgreSQL, SQLite or MS SQL. Optional CREATE TABLE, multi-value INSERT mode.
- SQL Formatter🗄️ Developer Tools
SQL Formatter — Paste any SQL query and get it formatted with proper indentation, keyword casing, and clause breaks. Supports 10 dialects including Post...
- SQL Formatter Advanced🗃️ Database Tools
Free online SQL formatter. Beautify SQL queries with dialect-specific options for MySQL, PostgreSQL, SQLite, and MSSQL. Copy formatted SQL instantly.