migration: set net profit from profit

This commit is contained in:
c9s 2024-11-15 18:02:32 +08:00
parent acf213b991
commit b574c25a56
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -4,7 +4,9 @@ ALTER TABLE `positions`
ADD COLUMN `net_profit` DECIMAL(16, 8) DEFAULT 0.00000000 NOT NULL ADD COLUMN `net_profit` DECIMAL(16, 8) DEFAULT 0.00000000 NOT NULL
; ;
-- +end -- +end
-- +begin
UPDATE positions SET net_profit = profit WHERE net_profit = 0.0;
-- +end
-- +down -- +down