Last active
March 20, 2020 20:14
-
-
Save faishal/3695dd2c984f3abf01498fecbade7e31 to your computer and use it in GitHub Desktop.
mydumper - add drop table statments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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