Skip to content

Commit e22f69a

Browse files
authored
JEST-278 refactor: DB_IMPORT_FLAGS var and protocol type (#42)
1 parent 9d48289 commit e22f69a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/db_migrate.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ DB_HOST='127.0.0.1'
99
DB_USER='root'
1010
DB_PASS='root'
1111
DB_EXPORT_FLAGS='--routines --quick --hex-blob --single-transaction'
12+
DB_IMPORT_FLAGS='--protocol=socket'
1213

1314
# Determine DB
1415
echo "Welcome to the SDIT DB Migrator (mysql/postgres) $NEWLINE"
@@ -41,7 +42,7 @@ case $DB_MODE in
4142

4243
echo -n "Copying...! $NEWLINE"
4344
# shellcheck disable=SC2086
44-
docker exec -i "$CONTAINER_NAME_FROM" mysqldump $DB_EXPORT_FLAGS --user="${DB_USER}" --password="${DB_PASS}" --port="${DB_PORT}" --databases "${DB_NAME}" | docker exec -i "$CONTAINER_NAME_TO" mysql --user="${DB_USER}" --password="${DB_PASS}" --port="${DB_TO_PORT}" "${DB_TO_NAME}"
45+
docker exec -i "$CONTAINER_NAME_FROM" mysqldump $DB_EXPORT_FLAGS --user="${DB_USER}" --password="${DB_PASS}" --port="${DB_PORT}" --databases "${DB_NAME}" | docker exec -i "$CONTAINER_NAME_TO" mysql $DB_IMPORT_FLAGS --user="${DB_USER}" --password="${DB_PASS}" --port="${DB_TO_PORT}" "${DB_TO_NAME}"
4546
echo -n "Copied...! $NEWLINE"
4647
;;
4748

0 commit comments

Comments
 (0)