Deps updates, handle more tables + LK code

This commit is contained in:
Marcus Lindvall 2021-12-30 12:40:50 +01:00
parent f649b5f953
commit 5fe140714e
14 changed files with 583 additions and 79 deletions

View file

@ -26,10 +26,11 @@ logger.info("Reading Jeeves DB structure")
meta = MetaData()
try:
meta.reflect(bind=db.raw.connection(),
only=['ar', 'ars', 'xae', 'xare', 'fr', 'kus', 'x1k',
meta.reflect(bind=db.raw_session.connection(),
only=['ar', 'ars', 'arsh', 'arean', 'xae', 'xare', 'fr', 'kus', 'x1k',
'oh', 'orp', 'lp', 'vg', 'xp', 'xm', 'prh', 'prl',
'kp', 'kpw', 'cr', 'X4', 'xw', 'X1'])
'kp', 'kpw', 'cr', 'X4', 'xw', 'X1',
'JAPP_EWMS_Item_Replenishment_Levels'])
except OperationalError as e:
logger.error("Failed to read Jeeves DB structure")
raise e
@ -194,3 +195,6 @@ def receive_attribute_instrument(cls, key, inst):
"listen for the 'attribute_instrument' event"
install_validator_listner(cls, key, inst)
db.set_model_class(RawBaseModel)