Commit 9c2a6b39 authored by tywldx's avatar tywldx
parents 184447f9 48d57246
...@@ -27,6 +27,7 @@ fi ...@@ -27,6 +27,7 @@ fi
# echo "CREATE DATABASE IF NOT EXISTS \`${database_name}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;" | mysql -h $mysql_host -P $target_db_port -uqa -pqatest # echo "CREATE DATABASE IF NOT EXISTS \`${database_name}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;" | mysql -h $mysql_host -P $target_db_port -uqa -pqatest
echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE IF NOT EXISTS \`${database_name}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;\"" echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE IF NOT EXISTS \`${database_name}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;\""
mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e "CREATE DATABASE IF NOT EXISTS \`${database_name}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;" mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e "CREATE DATABASE IF NOT EXISTS \`${database_name}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;"
if [ $? != 0 ];then echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE ${database_name}\" error";exit -1; fi
for entry in ./*.sql for entry in ./*.sql
do do
......
...@@ -91,6 +91,7 @@ function db_schema_sync() ...@@ -91,6 +91,7 @@ function db_schema_sync()
echo "--- Step 3: import basic data from backup file: $database $db_backup_sub_folders ---" echo "--- Step 3: import basic data from backup file: $database $db_backup_sub_folders ---"
sh $work_dir/db_import.sh $database $target_db_host $db_backup_sub_folders $delete_business_data $target_db_port sh $work_dir/db_import.sh $database $target_db_host $db_backup_sub_folders $delete_business_data $target_db_port
if [ $? != 0 ];then echo "db_import.sh $database error";exit -1; fi
echo "--- Step 4: sync schema: $database $target_db_host ---" echo "--- Step 4: sync schema: $database $target_db_host ---"
#sync_cmd="mss -conf ${config_file_name} -sync" #sync_cmd="mss -conf ${config_file_name} -sync"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment