Database Schema Diff
Compare two database schemas (CREATE TABLE dumps): see every change and get an ALTER TABLE script for MySQL, PostgreSQL or SQLite, with data-loss warnings.
Tool
About this tool
About Database Schema Diff
Moving a database from development to live, or checking what changed between two versions of an app? Paste the old and the new schema – for example from mysqldump --no-data or pg_dump --schema-only. The diff lists new and removed tables, added, removed and changed columns (type, NULL, primary key, unique) and foreign keys, then writes a migration script. It also warns about changes that can lose data or fail on existing rows, such as dropped columns, shorter VARCHARs and new NOT NULL columns without a default, and spots columns that were probably renamed.
How it works
Example
How to use this tool
- Paste the old schema on the left and the new one on the right.
- Choose MySQL/MariaDB, PostgreSQL or SQLite.
- Read the warnings, then download and test the script on a copy of the database.
Frequently asked questions
Can I run the script directly?
Review it first and always run it on a backup or staging copy. Data moves (renames, splits) need your own SQL.
Does it compare indexes and defaults?
It compares tables, columns, types, NULL, primary keys, UNIQUE and foreign keys. Other indexes, defaults and triggers are not compared yet.
Is my data uploaded?
No. Everything runs in your browser and stays on this device.
Does the Database Schema Diff send my data to a server?
No. The Database Schema Diff runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.