- changed status to resolved
Feature request: Ability to cope with DB restore without existing DB
Issue #4
resolved
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)
-
repo owner - Log in to comment
Added --if-exists to postgres dropdb statement to avoid throwing an error (fix issue
#4)→ <<cset 0f32ef022b1b>>