Skip to content

Instantly share code, notes, and snippets.

@santaklouse
Created November 7, 2018 14:15
Show Gist options
  • Select an option

  • Save santaklouse/e71b56548b148d0cad349cea96797cbe to your computer and use it in GitHub Desktop.

Select an option

Save santaklouse/e71b56548b148d0cad349cea96797cbe to your computer and use it in GitHub Desktop.
mysqldump dev -d --skip-add-drop-table --add-drop-table=false > dev.sql
mysqldump live -d --skip-add-drop-table --add-drop-table=false > live.sql
perl -pi -e 's/^--.*\n//;s{/\*.*\*/;\n?}{}' dev.sql live.sql
diff -B -U 5 dev.sql live.sql > schema.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment