add strategy column

This commit is contained in:
c9s 2021-02-15 20:35:27 +08:00
parent dad5738f0b
commit 7d243e6026
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,19 @@
-- +up
-- +begin
ALTER TABLE `trades` ADD COLUMN `pnl` DECIMAL NULL;
-- +end
-- +begin
ALTER TABLE `trades` ADD COLUMN `strategy` VARCHAR(32) NULL;
-- +end
-- +down
-- +begin
ALTER TABLE `trades` DROP COLUMN `pnl`;
-- +end
-- +begin
ALTER TABLE `trades` DROP COLUMN `strategy`;
-- +end

View File

@ -0,0 +1,18 @@
-- +up
-- +begin
ALTER TABLE `trades` ADD COLUMN `pnl` DECIMAL NULL;
-- +end
-- +begin
ALTER TABLE `trades` ADD COLUMN `strategy` TEXT;
-- +end
-- +down
-- +begin
ALTER TABLE `trades` RENAME COLUMN `pnl` TO `pnl_deleted`;
-- +end
-- +begin
ALTER TABLE `trades` RENAME COLUMN `strategy` TO `strategy_deleted`;
-- +end