Skip to content

Instantly share code, notes, and snippets.

@aanoaa
Created July 8, 2013 01:09
Show Gist options
  • Select an option

  • Save aanoaa/5945584 to your computer and use it in GitHub Desktop.

Select an option

Save aanoaa/5945584 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Usage: schema_diff.sh asanmv C10_DischargeData best C10_DischargeData
#
FOO=$1
FOO_TABLE=$2
BAR=$3
BAR_TABLE=$4
mysqldump -u root -p -d $FOO $FOO_TABLE > $FOO.sql
mysqldump -u root -p -d $BAR $BAR_TABLE > $BAR.sql
diff $FOO.sql $BAR.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment