Use --if-exists with import

To resolve https://github.com/dokku/dokku-postgres/issues/142
This commit is contained in:
Jose Diaz-Gonzalez
2018-04-24 15:05:55 -04:00
committed by Dan Poirier
parent f30db928fb
commit e78cc9bd36

View File

@@ -114,7 +114,7 @@ service_import() {
if [[ -t 0 ]]; then
dokku_log_fail "No data provided on stdin."
fi
docker exec -i "$SERVICE_NAME" env PGPASSWORD="$PASSWORD" pg_restore -h localhost -cO -d "$DATABASE_NAME" -U postgres -w
docker exec -i "$SERVICE_NAME" env PGPASSWORD="$PASSWORD" pg_restore -h localhost -cO --if-exists -d "$DATABASE_NAME" -U postgres -w
}
service_start() {