|
Does anyone know of a script (preferably PHP) that can take a snapshot of a MySQL database, similar to a backup made in phpMyAdmin but then compare it to future snapshots outputting only the changes.
Ideally I would like to test changes on a MySQL database, once satisfied I would like to run the script, grab the structural changes of the database then update the production database with those changes. Like subversion for MySQL!
DB 1.0
ID = tinyint(3)
Name = varchar(63)
DB 2.0
ID = mediumint(4)
Name = varchar(63)
The script would compare DB 1.0 to DB 2.0 and output
ALTER TABLE `test` CHANGE `ID` `ID` MEDIUMINT( 4 ) NOT NULL
The script would not care about the data within the table, however if it did I could just ignore it.
Thanks
|