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
7c89a38d
Commit
7c89a38d
authored
Mar 27, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run sql file
parent
6867a066
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
db_schema_sync.sh
db-utils/db_schema_sync.sh
+11
-1
No files found.
db-utils/db_schema_sync.sh
View file @
7c89a38d
...
@@ -64,6 +64,14 @@ function db_schema_sync()
...
@@ -64,6 +64,14 @@ function db_schema_sync()
$sync_cmd
$sync_cmd
}
}
function
run_sql_file
()
{
echo
"run sql files on
${
target_db_host
}
"
db_exe_cmd
=
"db_execute_sql
${
target_db_host
}
"
echo
"
${
db_exe_cmd
}
"
$db_exe_cmd
}
database_list
=
'xyqb xyqb_app payment_center risk_control dujiangyan mall qinqiong quartz contract financial_system gyxd offline sms-center spider_center xyqb_user merchant'
database_list
=
'xyqb xyqb_app payment_center risk_control dujiangyan mall qinqiong quartz contract financial_system gyxd offline sms-center spider_center xyqb_user merchant'
if
[[
"
$sync_db_name
"
=
"all"
]]
if
[[
"
$sync_db_name
"
=
"all"
]]
then
then
...
@@ -73,6 +81,8 @@ then
...
@@ -73,6 +81,8 @@ then
db_schema_sync
$db_name
db_schema_sync
$db_name
echo
$db_name
echo
$db_name
done
done
run_sql_file
else
else
db_schema_sync
$sync_db_name
db_schema_sync
$sync_db_name
run_sql_file
fi
fi
\ No newline at end of file
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