From c308b1b8082c0723d90eece358129424a0c4965d Mon Sep 17 00:00:00 2001 From: mirocow Date: Tue, 16 Feb 2016 16:31:52 +0400 Subject: [PATCH] Update restore_db.sh --- restore_db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restore_db.sh b/restore_db.sh index 9a1f863..8531362 100755 --- a/restore_db.sh +++ b/restore_db.sh @@ -34,7 +34,7 @@ restore() if [ -f $DIR/__create.sql ]; then f_log "Create database $BDD" - time mysql --defaults-extra-file=$CONFIG_FILE < $DIR/__create.sql 2>/dev/null + mysql --defaults-extra-file=$CONFIG_FILE < $DIR/__create.sql 2>/dev/null fi tables=$(ls -1 $DIR | grep -v __ | grep .sql | awk -F. '{print $1}' | sort | uniq) @@ -42,7 +42,7 @@ restore() f_log "Create tables in $BDD" for TABLE in $tables; do f_log "Create table: $BDD/$TABLE" - time mysql --defaults-extra-file=$CONFIG_FILE $BDD -e "SET foreign_key_checks = 0; + mysql --defaults-extra-file=$CONFIG_FILE $BDD -e "SET foreign_key_checks = 0; DROP TABLE IF EXISTS $TABLE; SOURCE $DIR/$TABLE.sql; SET foreign_key_checks = 1;"