Swap if-else in restore_database_dump in postgresql hook for cleanliness
This commit is contained in:
parent
dfccc1b94a
commit
f0f43174c6
1 changed files with 3 additions and 3 deletions
|
@ -221,9 +221,9 @@ def restore_database_dump(database_config, log_prefix, location_config, dry_run,
|
|||
tuple(psql_command if all_databases else pg_restore_command)
|
||||
+ ('--no-password',)
|
||||
+ (
|
||||
('--if-exists', '--exit-on-error', '--clean', '--dbname', database['name'])
|
||||
if not all_databases
|
||||
else ('--no-psqlrc', '--set', 'ON_ERROR_STOP=on')
|
||||
('--no-psqlrc', '--set', 'ON_ERROR_STOP=on')
|
||||
if all_databases
|
||||
else ('--if-exists', '--exit-on-error', '--clean', '--dbname', database['name'])
|
||||
)
|
||||
+ (('--host', database['hostname']) if 'hostname' in database else ())
|
||||
+ (('--port', str(database['port'])) if 'port' in database else ())
|
||||
|
|
Loading…
Reference in a new issue