mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
change balance_in_usd and balance_in_btc to signed
This commit is contained in:
parent
bb9a787575
commit
f196cc9ccd
|
@ -1,7 +1,9 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
ALTER TABLE `nav_history_details`
|
||||
MODIFY COLUMN `net_asset` DECIMAL(32, 8) DEFAULT 0.00000000 NOT NULL;
|
||||
MODIFY COLUMN `net_asset` DECIMAL(32, 8) DEFAULT 0.00000000 NOT NULL,
|
||||
MODIFY COLUMN `balance_in_usd` DECIMAL(32, 2) DEFAULT 0.00000000 NOT NULL,
|
||||
MODIFY COLUMN `balance_in_btc` DECIMAL(32, 20) DEFAULT 0.00000000 NOT NULL;
|
||||
-- +end
|
||||
|
||||
-- +begin
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
-- +begin
|
||||
CREATE TABLE `nav_history_details`
|
||||
(
|
||||
gid bigint unsigned auto_increment PRIMARY KEY,
|
||||
`exchange` VARCHAR NOT NULL DEFAULT '',
|
||||
`subaccount` VARCHAR NOT NULL DEFAULT '',
|
||||
time DATETIME(3) NOT NULL DEFAULT (strftime('%s','now')),
|
||||
currency VARCHAR NOT NULL,
|
||||
gid bigint unsigned auto_increment PRIMARY KEY,
|
||||
`exchange` VARCHAR NOT NULL DEFAULT '',
|
||||
`subaccount` VARCHAR NOT NULL DEFAULT '',
|
||||
time DATETIME(3) NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
currency VARCHAR NOT NULL,
|
||||
balance_in_usd DECIMAL DEFAULT 0.00000000 NOT NULL,
|
||||
balance_in_btc DECIMAL DEFAULT 0.00000000 NOT NULL,
|
||||
balance DECIMAL DEFAULT 0.00000000 NOT NULL,
|
||||
available DECIMAL DEFAULT 0.00000000 NOT NULL,
|
||||
locked DECIMAL DEFAULT 0.00000000 NOT NULL
|
||||
balance DECIMAL DEFAULT 0.00000000 NOT NULL,
|
||||
available DECIMAL DEFAULT 0.00000000 NOT NULL,
|
||||
locked DECIMAL DEFAULT 0.00000000 NOT NULL
|
||||
);
|
||||
-- +end
|
||||
-- +begin
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
-- +up
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `session` VARCHAR(50) NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `borrowed` DECIMAL UNSIGNED DEFAULT 0.00000000 NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `borrowed` DECIMAL DEFAULT 0.00000000 NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `net_asset` DECIMAL DEFAULT 0.00000000 NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `price_in_usd` DECIMAL UNSIGNED DEFAULT 0.00000000 NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `price_in_usd` DECIMAL DEFAULT 0.00000000 NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `is_margin` BOOL DEFAULT FALSE NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `is_isolated` BOOL DEFAULT FALSE NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `isolated_symbol` VARCHAR(30) DEFAULT '' NOT NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user