Update migrations to also support Postgres

closes #7038
This commit is contained in:
Matthias 2022-07-04 11:14:59 +02:00
parent edc9a42a4c
commit 6da3fa08e4
1 changed files with 4 additions and 4 deletions

View File

@ -255,8 +255,8 @@ def fix_old_dry_orders(engine):
text(
"""
update orders
set ft_is_open = 0
where ft_is_open = 1 and (ft_trade_id, order_id) not in (
set ft_is_open = false
where ft_is_open = true and (ft_trade_id, order_id) not in (
select id, stoploss_order_id from trades where stoploss_order_id is not null
) and ft_order_side = 'stoploss'
and order_id like 'dry_%'
@ -267,8 +267,8 @@ def fix_old_dry_orders(engine):
text(
"""
update orders
set ft_is_open = 0
where ft_is_open = 1
set ft_is_open = false
where ft_is_open = true
and (ft_trade_id, order_id) not in (
select id, open_order_id from trades where open_order_id is not null
) and ft_order_side != 'stoploss'