mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
add interest and fix net asset column
This commit is contained in:
parent
5662c5c680
commit
bb9a787575
17
migrations/mysql/20220504184155_fix_net_asset_column.sql
Normal file
17
migrations/mysql/20220504184155_fix_net_asset_column.sql
Normal file
|
@ -0,0 +1,17 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
ALTER TABLE `nav_history_details`
|
||||
MODIFY COLUMN `net_asset` DECIMAL(32, 8) DEFAULT 0.00000000 NOT NULL;
|
||||
-- +end
|
||||
|
||||
-- +begin
|
||||
ALTER TABLE `nav_history_details`
|
||||
ADD COLUMN `interest` DECIMAL(32, 20) UNSIGNED DEFAULT 0.00000000 NOT NULL;
|
||||
-- +end
|
||||
|
||||
-- +down
|
||||
|
||||
-- +begin
|
||||
ALTER TABLE `nav_history_details`
|
||||
DROP COLUMN `interest`;
|
||||
-- +end
|
|
@ -1,7 +1,7 @@
|
|||
-- +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 `net_asset` DECIMAL UNSIGNED 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 `is_margin` BOOL DEFAULT FALSE NOT NULL;
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `is_isolated` BOOL DEFAULT FALSE NOT NULL;
|
||||
|
|
11
migrations/sqlite3/20220504184155_fix_net_asset_column.sql
Normal file
11
migrations/sqlite3/20220504184155_fix_net_asset_column.sql
Normal file
|
@ -0,0 +1,11 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
ALTER TABLE `nav_history_details` ADD COLUMN `interest` DECIMAL DEFAULT 0.00000000 NOT NULL;
|
||||
-- +end
|
||||
|
||||
|
||||
-- +down
|
||||
|
||||
-- +begin
|
||||
SELECT 1;
|
||||
-- +end
|
Loading…
Reference in New Issue
Block a user