add interest and fix net asset column

This commit is contained in:
c9s 2022-05-04 18:45:36 +08:00
parent 5662c5c680
commit bb9a787575
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
3 changed files with 29 additions and 1 deletions

View 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

View File

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

View 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