mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Add a new session for KeyValues.
This commit is contained in:
@@ -58,7 +58,8 @@ def init_db(db_url: str) -> None:
|
||||
Trade.query = Trade._session.query_property()
|
||||
Order.query = Trade._session.query_property()
|
||||
PairLock.query = Trade._session.query_property()
|
||||
KeyValue.query = Trade._session.query_property()
|
||||
KeyValue._session = scoped_session(sessionmaker(bind=engine, autoflush=True))
|
||||
KeyValue.query = KeyValue._session.query_property()
|
||||
|
||||
previous_tables = inspect(engine).get_table_names()
|
||||
_DECL_BASE.metadata.create_all(engine)
|
||||
|
||||
Reference in New Issue
Block a user