Use a read-only DB session to retrieve schema version
Change-Id: If1e57557783e4284e5d4c613cefa82cee42c9dd2
This commit is contained in:
parent
1249360bf6
commit
50430f5c8f
|
@ -215,7 +215,7 @@ def offline_sync_database_to_version(version=None):
|
||||||
|
|
||||||
|
|
||||||
def get_db_version():
|
def get_db_version():
|
||||||
with sql.session_for_write() as session:
|
with sql.session_for_read() as session:
|
||||||
return migration.db_version(session.get_bind(),
|
return migration.db_version(session.get_bind(),
|
||||||
find_migrate_repo(),
|
find_migrate_repo(),
|
||||||
get_init_version())
|
get_init_version())
|
||||||
|
|
Loading…
Reference in New Issue