FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
queue/scripts/diff_databases.sh at master · illinois/queue · GitHub
illinois
/
queue
Public
Notifications
You must be signed in to change notification settings
Fork
38
Star
86
Code
Issues
73
Pull requests
5
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
queue
/
scripts
/
diff_databases.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
24 lines (18 loc) · 956 Bytes
Breadcrumbs
queue
/
scripts
/
diff_databases.sh
Copy path
File metadata and controls
executable file
·
24 lines (18 loc) · 956 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!
/bin/bash
#
Check for the existence of mysqldbcompare
if
!
[
-x
"
$(
command -v mysqldbcompare
)
"
]
;
then
echo
'
Error: MySQL Utilities are required.
'
>&2
echo
'
Please install them from https://dev.mysql.com/downloads/utilities/
'
>&2
exit
1
fi
#
Get the directory we're in
DIR=
"
$(
cd
"
$(
dirname
"
${BASH_SOURCE[0]}
"
)
"
&&
pwd
)
"
#
Set up the verification databases in Node
npx ts-node --project
$DIR
/../tsconfig.server.json -e
"
require('
$DIR
/../src/migrations/util').createVerificationDatabases()
"
#
Perform the actual diff
mysqldbcompare --server1=
"
queue@localhost
"
--server2=
"
queue@localhost
"
--run-all-tests --changes-for=server2 --character-set=utf8 queue_sequelize:queue_migrations
EXIT_CODE=
$?
#
Destroy the verification databases in Node
npx ts-node --project
$DIR
/../tsconfig.server.json -e
"
require('
$DIR
/../src/migrations/util').destroyVerificationDatabases()
"
#
Let the user know if the databases diffed cleanly or not
exit
$EXIT_CODE
Back
|
FazBrowse Home
|
New Git URL