Feature request: Ability to cope with DB restore without existing DB

Issue #4 resolved
Matthew Vella created an issue

When restoring a postgres database, the script calls
dropdb $POSTGRES_HOST_OPTS $DB_NAME
which is fine, except when doing a restore to a fresh setup and there is no existing database with that name, the script fails with
dropdb: error: database removal failed: ERROR: database "$DB_NAME" does not exist

It would be really handy to include the --if-exists argument on the dropdb line in the restore script

Presumably the same enhancement would be possible when restoring a MySQL DB as well

Comments (1)

  1. Log in to comment