mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
migrations: merge pnl, strategy migration
This commit is contained in:
parent
32a5cd9f85
commit
a8b35867a5
|
@ -20,6 +20,9 @@ CREATE TABLE `trades`
|
|||
`is_margin` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
`is_isolated` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
|
||||
`strategy` VARCHAR(32) NULL,
|
||||
`pnl` DECIMAL NULL,
|
||||
|
||||
PRIMARY KEY (`gid`),
|
||||
UNIQUE KEY `id` (`exchange`, `symbol`, `side`, `id`)
|
||||
);
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
ALTER TABLE `trades` ADD COLUMN `pnl` DECIMAL NULL;
|
||||
SELECT 1;
|
||||
-- +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`;
|
||||
SELECT 1;
|
||||
-- +end
|
||||
|
|
Loading…
Reference in New Issue
Block a user