Skip to content

Commit

Permalink
Don't leave old data laying around
Browse files Browse the repository at this point in the history
  • Loading branch information
rkoster committed Dec 12, 2017
1 parent 3198b11 commit 869a00f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jobs/migrate-postgres/templates/pre-start.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ NEW_STORE_DIR=/var/vcap/store/postgres

if [ ! -d ${NEW_STORE_DIR}/postgres-previous ]; then
mkdir -p ${NEW_STORE_DIR}
ln -s ${OLD_STORE_DIR} ${NEW_STORE_DIR}/postgres-unknown
mv ${OLD_STORE_DIR} ${NEW_STORE_DIR}/postgres-unknown
ln -s ${NEW_STORE_DIR}/postgres-unknown ${OLD_STORE_DIR}
/var/vcap/jobs/postgres/bin/pre-start
rm ${OLD_STORE_DIR}
fi

0 comments on commit 869a00f

Please sign in to comment.