compile and update migration package

This commit is contained in:
c9s 2021-12-27 19:13:21 +08:00
parent aff540c12d
commit 4a6c9deb8d
2 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,11 @@ func upAddKlineTakerBuyColumns(ctx context.Context, tx rockhopper.SQLExecutor) (
return err
}
_, err = tx.ExecContext(ctx, "ALTER TABLE `klines`\n ADD COLUMN `quote_volume` DECIMAL(32, 8) NOT NULL DEFAULT 0.0,\n ADD COLUMN `taker_buy_base_volume` DECIMAL(32, 8) NOT NULL DEFAULT 0.0,\n ADD COLUMN `taker_buy_quote_volume` DECIMAL(32, 8) NOT NULL DEFAULT 0.0;")
if err != nil {
return err
}
return err
}

View File

@ -29,6 +29,11 @@ func upAddKlineTakerBuyColumns(ctx context.Context, tx rockhopper.SQLExecutor) (
return err
}
_, err = tx.ExecContext(ctx, "ALTER TABLE `klines`\n ADD COLUMN `quote_volume` DECIMAL NOT NULL DEFAULT 0.0;\nALTER TABLE `klines`\n ADD COLUMN `taker_buy_base_volume` DECIMAL NOT NULL DEFAULT 0.0;\nALTER TABLE `klines`\n ADD COLUMN `taker_buy_quote_volume` DECIMAL NOT NULL DEFAULT 0.0;")
if err != nil {
return err
}
return err
}