From 3d7a74551fbb75758880a7f09734c73413ecf90a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 11 Jul 2021 11:16:46 +0200 Subject: [PATCH] Boolean sqlite fix for orders table --- freqtrade/persistence/migrations.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/persistence/migrations.py b/freqtrade/persistence/migrations.py index 77254a9a6..3a3457354 100644 --- a/freqtrade/persistence/migrations.py +++ b/freqtrade/persistence/migrations.py @@ -150,8 +150,9 @@ 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""" insert into orders ( id, ft_trade_id, ft_order_side, ft_pair, ft_is_open, order_id,