2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00

fix: make changes to psql restore

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2020-07-09 22:57:12 +05:30
parent 5c57334bb6
commit c67fc02452
No known key found for this signature in database
GPG Key ID: 75507BE256F40CED

View File

@ -209,7 +209,7 @@ def restore_postgres(config, site_config, database_file):
run_command(psql_command + ["-c ", f"\"CREATE DATABASE \"{db_name}\"\""])
run_command(psql_command + ["-c", f"\"CREATE user {db_name} password '{db_password}'\""])
run_command(psql_command + ["-c", f"\"GRANT ALL PRIVILEGES ON DATABASE \"{db_name}\" TO {db_name}\""])
run_command([f"{psql_command}/{db_name}", "<", database_file.replace('.gz', '')])
run_command(["psql", f"{psql_command[-1]}/{db_name}", "<", database_file.replace('.gz', '')])
def restore_mariadb(config, site_config, database_file):