Merge branch 'develop' into feat/short

This commit is contained in:
Matthias
2022-03-13 15:38:12 +01:00
10 changed files with 87 additions and 34 deletions

View File

@@ -195,6 +195,7 @@ def drop_orders_table(engine, table_back_name: str):
def migrate_orders_table(engine, table_back_name: str, cols_order: List):
ft_fee_base = get_column_def(cols_order, 'ft_fee_base', 'null')
average = get_column_def(cols_order, 'average', 'null')
# let SQLAlchemy create the schema as required
leverage = get_column_def(cols_order, 'leverage', '1.0')
@@ -205,8 +206,8 @@ def migrate_orders_table(engine, table_back_name: str, cols_order: List):
status, symbol, order_type, side, price, amount, filled, average, remaining, cost,
order_date, order_filled_date, order_update_date, ft_fee_base, leverage)
select id, ft_trade_id, ft_order_side, ft_pair, ft_is_open, order_id,
status, symbol, order_type, side, price, amount, filled, null average, remaining, cost,
order_date, order_filled_date, order_update_date, {ft_fee_base} ft_fee_base,
status, symbol, order_type, side, price, amount, filled, {average} average, remaining,
cost, order_date, order_filled_date, order_update_date, {ft_fee_base} ft_fee_base,
{leverage} leverage
from {table_back_name}
"""))