Skip to content

Instantly share code, notes, and snippets.

@faishal
Last active March 20, 2020 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faishal/3695dd2c984f3abf01498fecbade7e31 to your computer and use it in GitHub Desktop.
Save faishal/3695dd2c984f3abf01498fecbade7e31 to your computer and use it in GitHub Desktop.
mydumper - add drop table statments
find ./production/ -name "*-schema.sql" -print | xargs sed -ri 's/CREATE\sTABLE\s`([a-zA-Z0-1_]+)`\s/DROP TABLE IF EXISTS `\1`;\nCREATE TABLE `\1` /;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment