bbgo_origin/migrations/mysql/20220504184155_fix_net_asset_column.sql

20 lines
554 B
MySQL
Raw Normal View History

2022-05-04 10:45:36 +00:00
-- +up
-- +begin
ALTER TABLE `nav_history_details`
MODIFY COLUMN `net_asset` DECIMAL(32, 8) DEFAULT 0.00000000 NOT NULL,
CHANGE COLUMN `balance_in_usd` `net_asset_in_usd` DECIMAL(32, 2) DEFAULT 0.00000000 NOT NULL,
CHANGE COLUMN `balance_in_btc` `net_asset_in_btc` DECIMAL(32, 20) DEFAULT 0.00000000 NOT NULL;
2022-05-04 10:45:36 +00:00
-- +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