Repository files navigation
The small application in this repository does :
read two mysql dump (with or without data).
print the differences.
propose SQL statements to make the 2 databases structurally identical.
The main avantages over other software are :
does not need an actual connection to the databases, you can compare production db to development db.
it's batchable so you can use it in your Continuous Integration build system.
it's fast : less than a second on a 200+ tables file.
it works great (at least in my case)
install jdk, maven
git clone this repository
mvn package
cd target
java -jar mysqldiff-1.0-SNAPSHOT.jar -u for Usage
java -jar mysqldiff-1.0-SNAPSHOT.jar -fA dump1.sql -fB dump2.sql [-nA name1] [-nB [name2]
doesn't take care of triggers, stored procedure, etc. and i don't think i'm going to do it.
works well with phpmyadmin and adminer export, not sure it will work with an actual mysql dump (but i'm going to check that at some point)
has bug(s) on Foreign Key detection
if a table is missing, the CREATE TABLE statement is not produced (yet)
if a column/index/foreignkey is renammed it count as 2 differences (for now)
same for column datatype difference
add some command line parameters handling [Done]
add some output option (choose SQL action to make the databases identical by adding or removing stuff) [Partially Done]
?
About
A small tool to diff mysql schema
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.