mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Improve diagnostics on database upgrade failure (#6570)
`Failed to upgrade database` is not helpful, and it's unlikely that UPGRADE.rst has anything useful.
This commit is contained in:
parent
0b794cbd7b
commit
bca30cefee
3 changed files with 7 additions and 8 deletions
|
@ -69,7 +69,10 @@ def prepare_database(db_conn, database_engine, config, data_stores=["main"]):
|
|||
if user_version != SCHEMA_VERSION:
|
||||
# If we don't pass in a config file then we are expecting to
|
||||
# have already upgraded the DB.
|
||||
raise UpgradeDatabaseException("Database needs to be upgraded")
|
||||
raise UpgradeDatabaseException(
|
||||
"Expected database schema version %i but got %i"
|
||||
% (SCHEMA_VERSION, user_version)
|
||||
)
|
||||
else:
|
||||
_upgrade_existing_database(
|
||||
cur,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue