diff --git a/migrations/mysql/20241115165059_add_net_profit_column.sql b/migrations/mysql/20241115165059_add_net_profit_column.sql index 73bdfcf50..702686276 100644 --- a/migrations/mysql/20241115165059_add_net_profit_column.sql +++ b/migrations/mysql/20241115165059_add_net_profit_column.sql @@ -4,7 +4,9 @@ ALTER TABLE `positions` ADD COLUMN `net_profit` DECIMAL(16, 8) DEFAULT 0.00000000 NOT NULL ; -- +end - +-- +begin +UPDATE positions SET net_profit = profit WHERE net_profit = 0.0; +-- +end -- +down