Commit 9a41b8b4 authored by 智勇's avatar 智勇

fix

parent 6c1df5a5
File mode changed from 100644 to 100755
......@@ -67,13 +67,13 @@ function db_schema_sync()
if [ "$delete_business_data" = "true" ];then
# echo "DROP DATABASE ${database_name};" | mysql -h $mysql_host -P $target_db_port -uqa -pqatest
echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e \"DROP DATABASE ${database};\""
mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e "DROP DATABASE ${database};"
echo "mysql -h $target_db_host -P $target_db_port -uqa -pqatest -e \"DROP DATABASE ${database};\""
mysql -h $target_db_host -P $target_db_port -uqa -pqatest -e "DROP DATABASE ${database};"
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 "mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE IF NOT EXISTS \`${database}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;\""
mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e "CREATE DATABASE IF NOT EXISTS \`${database}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;"
if [ $? != 0 ];then echo "mysql -h $mysql_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE IF NOT EXISTS ${database}\" error";exit -1; fi
echo "mysql -h $target_db_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE IF NOT EXISTS \`${database}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;\""
mysql -h $target_db_host -P $target_db_port -uqa -pqatest -e "CREATE DATABASE IF NOT EXISTS \`${database}\` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;"
if [ $? != 0 ];then echo "mysql -h $target_db_host -P $target_db_port -uqa -pqatest -e \"CREATE DATABASE IF NOT EXISTS ${database}\" error";exit -1; fi
echo "mkdir $db_backup_sub_folders"
mkdir -p $db_backup_sub_folders
......
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