change balance_in_usd and balance_in_btc to signed

This commit is contained in:
c9s 2022-05-04 19:05:31 +08:00
parent bb9a787575
commit f196cc9ccd
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 13 additions and 11 deletions

View File

@ -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

View File

@ -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;