Merge pull request #11316 from gavindsouza/connect-db

fix: Re-connect to database in case connection is closed
This commit is contained in:
mergify[bot] 2020-08-31 06:19:45 +00:00 committed by GitHub
commit e62e895c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,8 @@ def bootstrap_database(db_name, verbose, source_sql=None):
sys.exit(1)
import_db_from_sql(source_sql, verbose)
frappe.connect(db_name=db_name)
if not 'tabDefaultValue' in frappe.db.get_tables():
print('''Database not installed, this can due to lack of permission, or that the database name exists.
Check your mysql root password, or use --force to reinstall''')