fix: add latest schema columns on app startup, unless not supported
this works around the issue where some CORE databases are too old (etc.) and are missing some schema columns. in such cases the config for "latest columns" should be disabled; otherwise we add them to schema on startup
This commit is contained in:
parent
9946642bf2
commit
9f779fe60f
|
@ -100,3 +100,9 @@ class WuttaCoreposConfigExtension(WuttaConfigExtension):
|
||||||
config.core_office_arch_engines = engines
|
config.core_office_arch_engines = engines
|
||||||
config.core_office_arch_engine = engines.get('default')
|
config.core_office_arch_engine = engines.get('default')
|
||||||
Session.configure(bind=config.core_office_arch_engine)
|
Session.configure(bind=config.core_office_arch_engine)
|
||||||
|
|
||||||
|
# define some schema columns "late" unless not supported
|
||||||
|
if config.get_bool('corepos.db.office_op.use_latest_columns',
|
||||||
|
default=True, usedb=False):
|
||||||
|
from corepos.db.office_op.model import use_latest_columns
|
||||||
|
use_latest_columns()
|
||||||
|
|
Loading…
Reference in a new issue