magicdiff generates automagically sql diffs for a database between two given states.
- Spits out real sql queries that can be applied on previous state
- Does not use sql triggers or binary / ddl logs
- Works with any shared hosting provider
- Data and schema changes, at the same time
- Fast
- Command line tool and class usage possible
- Covered through test suite
- Returns (separate) diffs and patch files
- Can ignore certain tables
- Takes care of (primary) keys and all kinds or altering tables
- Zero dependencies
This does not prevent you from taking backups. Use this script at your own risk.
wget https://raw.githubusercontent.com/vielhuber/magicdiff/master/src/magicdiff.php
php magicdiff.php setup
php magicdiff.php init
php magicdiff.php diff
composer require vielhuber/magicdiff
<?php
require __DIR__ . '/vendor/autoload.php';
use vielhuber\magicdiff\magicdiff;
magicdiff::setup();
magicdiff::init();
magicdiff::diff();