fix
This commit is contained in:
@@ -1676,9 +1676,8 @@ subcommand_diff() {
|
|||||||
exit 9
|
exit 9
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# NOTE: yes, RESTORE, not DIFF prefix
|
if [ -z "$DIFF_BACKUP_PATH" ]; then
|
||||||
if [ -z "$RESTORE_BACKUP_PATH" ]; then
|
DIFF_BACKUP_PATH="$1"
|
||||||
RESTORE_BACKUP_PATH="$1"
|
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
log error "diff: unexpected argument $1"
|
log error "diff: unexpected argument $1"
|
||||||
@@ -1688,6 +1687,10 @@ subcommand_diff() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -z "$DIFF_BACKUP_PATH" ]; then
|
||||||
|
DIFF_BACKUP_PATH="$DEFAULT_BACKUP_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
DIFF_TMPDIR="${LOCAL_DIR}/focus/database-diff-operation"
|
DIFF_TMPDIR="${LOCAL_DIR}/focus/database-diff-operation"
|
||||||
DIFF_PGDATA1="$DIFF_TMPDIR/pgdata1"
|
DIFF_PGDATA1="$DIFF_TMPDIR/pgdata1"
|
||||||
DIFF_PGDATA2="$DIFF_TMPDIR/pgdata2"
|
DIFF_PGDATA2="$DIFF_TMPDIR/pgdata2"
|
||||||
@@ -1717,7 +1720,7 @@ subcommand_diff() {
|
|||||||
|
|
||||||
log notice "provisioning ${WHITE}DB1$NC (backup + migrations)"
|
log notice "provisioning ${WHITE}DB1$NC (backup + migrations)"
|
||||||
|
|
||||||
PG_WORKING_DIR="$DIFF_PGDATA1" PG_LOG_PATH="$DIFF_PGDATA1" subcommand_restore
|
PG_WORKING_DIR="$DIFF_PGDATA1" PG_LOG_PATH="$DIFF_PGDATA1" subcommand_restore "$DIFF_BACKUP_PATH"
|
||||||
|
|
||||||
log info "applying migrations to ${WHITE}DB1$NC"
|
log info "applying migrations to ${WHITE}DB1$NC"
|
||||||
subcommand_migrator migrate up all \
|
subcommand_migrator migrate up all \
|
||||||
|
|||||||
Reference in New Issue
Block a user