Merge pull request #11316 from gavindsouza/connect-db
fix: Re-connect to database in case connection is closed
This commit is contained in:
commit
e62e895c6e
1 changed files with 2 additions and 0 deletions
|
|
@ -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''')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue