This repository was archived by the owner on Jan 25, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -164,17 +164,21 @@ function database_import() {
164164 fi
165165 fi
166166
167- output " Dropping any prior tables "
167+ if [ ! $( has_arg --no-droptables ) ] ; then
168168
169- if [ ! $( has_arg --dryrun) ]; then
170- box container exec ${database} mysql -h ${DB_HOST_IP} -u wordpress -pwordpress -Nse " show tables;" wordpress 2>&1 | grep -v " Warning:" > /tmp/mysql-table-list.txt
171- cat /tmp/mysql-table-list.txt | while read table
172- do
169+ output " Dropping any prior tables"
170+
171+ if [ ! $( has_arg --dryrun) ]; then
172+ box container exec ${database} mysql -h ${DB_HOST_IP} -u wordpress -pwordpress -Nse " show tables;" wordpress 2>&1 | grep -v " Warning:" > /tmp/mysql-table-list.txt
173+ cat /tmp/mysql-table-list.txt | while read table
174+ do
173175 box container exec ${database} mysql -h ${DB_HOST_IP} -u wordpress -pwordpress -e " drop table $table " wordpress 2>&1 | grep -v " Warning:"
174- done
175- rm /tmp/mysql-table-list.txt
176+ done
177+ rm /tmp/mysql-table-list.txt
178+ fi
179+ output " Tables dropped"
180+
176181 fi
177- output " Tables dropped"
178182
179183 if [ " " != " $( cat " ${importfilepath} " | grep " utf8mb4_unicode_520_ci" ) " ]; then
180184 #
You can’t perform that action at this time.
0 commit comments