mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 15:25:14 +00:00
18 lines
285 B
SQL
18 lines
285 B
SQL
-- +up
|
|
-- +begin
|
|
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
|
|
|
|
-- +begin
|
|
ALTER TABLE `positions`
|
|
DROP COLUMN `net_profit`
|
|
;
|
|
-- +end
|