diff --git a/pkg/migrations/mysql/main_20241115165059_add_net_profit_column.go b/pkg/migrations/mysql/main_20241115165059_add_net_profit_column.go index 15307b315..d17c81c34 100644 --- a/pkg/migrations/mysql/main_20241115165059_add_net_profit_column.go +++ b/pkg/migrations/mysql/main_20241115165059_add_net_profit_column.go @@ -16,6 +16,10 @@ func up_main_addNetProfitColumn(ctx context.Context, tx rockhopper.SQLExecutor) if err != nil { return err } + _, err = tx.ExecContext(ctx, "UPDATE positions SET net_profit = profit WHERE net_profit = 0.0;") + if err != nil { + return err + } return err }