Last active
June 17, 2021 15:04
-
-
Save PululuK/396a9762b660be1bf1b1c98bd81a76c7 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
sed -i -r 's/(^_TABLE_PREFIX_\w+)/DROP TABLE migration_database_name.\1 ; CREATE TABLE migration_database_name.\1 LIKE upgrade_database_name.\1; INSERT INTO migration_database_name.\1 SELECT * FROM upgrade_database_name.\1;/g' migration-file-csv.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment