Boolean sqlite fix for orders table

This commit is contained in:
Matthias 2021-07-11 11:16:46 +02:00
parent 56ec1c9499
commit 7d615b4f5d

View File

@ -150,7 +150,8 @@ def migrate_orders_table(decl_base, inspector, engine, table_back_name: str, col
# let SQLAlchemy create the schema as required
decl_base.metadata.create_all(engine)
leverage = get_column_def(cols, 'leverage', '1.0')
is_short = get_column_def(cols, 'is_short', 'False')
# sqlite does not support literals for booleans
is_short = get_column_def(cols, 'is_short', '0')
# TODO-mg: Should liquidation price go in here?
with engine.begin() as connection:
connection.execute(text(f"""