From 44128aa62e32b6aa6d26bf72066dab128e2101ca Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Tue, 22 Oct 2024 12:41:13 +0530 Subject: [PATCH] refactor: update backup restore failure message Signed-off-by: Akhil Narang --- frappe/database/mariadb/setup_db.py | 6 ++---- frappe/database/postgres/setup_db.py | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frappe/database/mariadb/setup_db.py b/frappe/database/mariadb/setup_db.py index 95cd1dc824..495575590a 100644 --- a/frappe/database/mariadb/setup_db.py +++ b/frappe/database/mariadb/setup_db.py @@ -79,10 +79,8 @@ def bootstrap_database(verbose, source_sql=None): secho( "Table 'tabDefaultValue' missing in the restored site. " - "Database not installed correctly, this can due to lack of " - "permission, or that the database name exists. Check your mysql" - " root password, validity of the backup file or use --force to" - " reinstall", + "This happens when the backup fails to restore. Please check that the file is valid\n" + "Do go through the above output to check the exact error message from MariaDB", fg="red", ) sys.exit(1) diff --git a/frappe/database/postgres/setup_db.py b/frappe/database/postgres/setup_db.py index 2c5b76169e..2895588ce2 100644 --- a/frappe/database/postgres/setup_db.py +++ b/frappe/database/postgres/setup_db.py @@ -38,8 +38,8 @@ def bootstrap_database(verbose, source_sql=None): secho( "Table 'tabDefaultValue' missing in the restored site. " - "This may be due to incorrect permissions or the result of a restore from a bad backup file. " - "Database not installed correctly.", + "This happens when the backup fails to restore. Please check that the file is valid\n" + "Do go through the above output to check the exact error message from MariaDB", fg="red", ) sys.exit(1)