Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-deploy-utils
Commits
6323d9e0
Commit
6323d9e0
authored
Nov 08, 2017
by
qa_quantgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add silk_road
parent
b2acb714
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
db_gen_config.sh
db-utils/db_gen_config.sh
+5
-0
db_schema_sync.sh
db-utils/db_schema_sync.sh
+3
-3
No files found.
db-utils/db_gen_config.sh
View file @
6323d9e0
...
@@ -111,6 +111,11 @@ elif [[ $database_name = 'spider_center' ]]; then
...
@@ -111,6 +111,11 @@ elif [[ $database_name = 'spider_center' ]]; then
# 授信中心
# 授信中心
sys_table_list
=
'merchant merchant_config'
sys_table_list
=
'merchant merchant_config'
port
=
'3312'
port
=
'3312'
elif
[[
$database_name
=
'silk_road'
]]
;
then
#
sys_table_list
=
'task'
source_db_host
=
'192.168.4.80'
port
=
'9999'
elif
[[
$database_name
=
'xyqb_user'
]]
;
then
elif
[[
$database_name
=
'xyqb_user'
]]
;
then
# 用户中心
# 用户中心
sys_table_list
=
'merchant_config merchant'
sys_table_list
=
'merchant_config merchant'
...
...
db-utils/db_schema_sync.sh
View file @
6323d9e0
...
@@ -16,7 +16,7 @@ if [ $# -ne 9 ]; then
...
@@ -16,7 +16,7 @@ if [ $# -ne 9 ]; then
echo
"target_db_infos:target_db_host:
$4
, target_db_user:
$5
"
echo
"target_db_infos:target_db_host:
$4
, target_db_user:
$5
"
echo
"sync_db_name:
$7
, re_replace_ip:
$8
"
echo
"sync_db_name:
$7
, re_replace_ip:
$8
"
echo
"delete_business_data:
$9
"
echo
"delete_business_data:
$9
"
echo
"---
参数不正确
---"
echo
"---
参数不正确
---"
echo
"Usage:sh db_schema_sync.sh source_db_host source_db_user source_db_pwd target_db_host target_db_user target_db_pwd sync_db_name"
echo
"Usage:sh db_schema_sync.sh source_db_host source_db_user source_db_pwd target_db_host target_db_user target_db_pwd sync_db_name"
echo
"---------------"
echo
"---------------"
exit
1
exit
1
...
@@ -102,8 +102,8 @@ function run_sql_file()
...
@@ -102,8 +102,8 @@ function run_sql_file()
sh
$work_dir
/db_execute_sql.sh
$target_db_host
$sync_db_name
sh
$work_dir
/db_execute_sql.sh
$target_db_host
$sync_db_name
}
}
database_list
=
'cash_loan_flow contract dujiangyan financial_system financial_system_api fund_manage gyxd mall merchant notify offline payment_center qinqiong quartz redpacket risk_control spider_center xyqb xyqb_app xyqb_btzt xyqb_user'
database_list
=
'cash_loan_flow contract dujiangyan financial_system financial_system_api fund_manage gyxd mall merchant notify offline payment_center qinqiong quartz redpacket risk_control s
ilk_road s
pider_center xyqb xyqb_app xyqb_btzt xyqb_user'
database_list2
=
'cash_loan_flow contract dujiangyan financial_system financial_system_api fund_manage gyxd merchant notify offline payment_center qinqiong quartz redpacket risk_control spider_center xyqb xyqb_app xyqb_btzt xyqb_user'
database_list2
=
'cash_loan_flow contract dujiangyan financial_system financial_system_api fund_manage gyxd merchant notify offline payment_center qinqiong quartz redpacket risk_control s
ilk_road s
pider_center xyqb xyqb_app xyqb_btzt xyqb_user'
if
[[
"
$sync_db_name
"
=
"all"
]]
if
[[
"
$sync_db_name
"
=
"all"
]]
then
then
echo
"sync all database schema"
echo
"sync all database schema"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment