diff --git a/freqtrade/persistence/migrations.py b/freqtrade/persistence/migrations.py index a28683e04..f020f990c 100644 --- a/freqtrade/persistence/migrations.py +++ b/freqtrade/persistence/migrations.py @@ -159,10 +159,10 @@ def migrate_trades_and_orders_table( {initial_stop_loss_pct} initial_stop_loss_pct, {stoploss_order_id} stoploss_order_id, {stoploss_last_update} stoploss_last_update, {max_rate} max_rate, {min_rate} min_rate, - case when {exit_reason} == 'sell_signal' then 'exit_signal' - when {exit_reason} == 'custom_sell' then 'custom_exit' - when {exit_reason} == 'force_sell' then 'force_exit' - when {exit_reason} == 'emergency_sell' then 'emergency_exit' + case when {exit_reason} = 'sell_signal' then 'exit_signal' + when {exit_reason} = 'custom_sell' then 'custom_exit' + when {exit_reason} = 'force_sell' then 'force_exit' + when {exit_reason} = 'emergency_sell' then 'emergency_exit' else {exit_reason} end exit_reason, {exit_order_status} exit_order_status,