mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
add klines columns
This commit is contained in:
parent
507ae934c0
commit
4bec8984c0
|
@ -576,6 +576,12 @@ rockhopper --config rockhopper_sqlite.yaml up
|
|||
rockhopper --config rockhopper_mysql.yaml up
|
||||
```
|
||||
|
||||
Then run the following command to compile the migration files into go files:
|
||||
|
||||
```shell
|
||||
make migrations
|
||||
```
|
||||
|
||||
### Setup frontend development environment
|
||||
|
||||
```sh
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
ALTER TABLE `binance_klines`
|
||||
ADD COLUMN `taker_buy_base_volume` DECIMAL(16, 8) NOT NULL DEFAULT 0.0,
|
||||
ADD COLUMN `taker_buy_quote_volume` DECIMAL(16, 8) NOT NULL DEFAULT 0.0;
|
||||
-- +end
|
||||
-- +begin
|
||||
ALTER TABLE `max_klines`
|
||||
ADD COLUMN `taker_buy_base_volume` DECIMAL(16, 8) NOT NULL DEFAULT 0.0,
|
||||
ADD COLUMN `taker_buy_quote_volume` DECIMAL(16, 8) NOT NULL DEFAULT 0.0;
|
||||
-- +end
|
||||
-- +begin
|
||||
ALTER TABLE `okex_klines`
|
||||
ADD COLUMN `taker_buy_base_volume` DECIMAL(16, 8) NOT NULL DEFAULT 0.0,
|
||||
ADD COLUMN `taker_buy_quote_volume` DECIMAL(16, 8) NOT NULL DEFAULT 0.0;
|
||||
-- +end
|
||||
|
||||
-- +down
|
||||
-- +begin
|
||||
ALTER TABLE `binance_klines`
|
||||
DROP COLUMN `taker_buy_base_volume`,
|
||||
DROP COLUMN `taker_buy_quote_volume`;
|
||||
-- +end
|
||||
|
||||
-- +begin
|
||||
ALTER TABLE `max_klines`
|
||||
DROP COLUMN `taker_buy_base_volume`,
|
||||
DROP COLUMN `taker_buy_quote_volume`;
|
||||
-- +end
|
||||
|
||||
-- +begin
|
||||
ALTER TABLE `okex_klines`
|
||||
DROP COLUMN `taker_buy_base_volume`,
|
||||
DROP COLUMN `taker_buy_quote_volume`;
|
||||
-- +end
|
|
@ -0,0 +1,10 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
SELECT 'up SQL query';
|
||||
-- +end
|
||||
|
||||
-- +down
|
||||
|
||||
-- +begin
|
||||
SELECT 'down SQL query';
|
||||
-- +end
|
|
@ -61,8 +61,8 @@ type KLine struct {
|
|||
Low float64 `json:"low" db:"low"`
|
||||
Volume float64 `json:"volume" db:"volume"`
|
||||
QuoteVolume float64 `json:"quoteVolume" db:"quote_volume"`
|
||||
TakerBuyBaseAssetVolume float64 `json:"takerBuyBaseAssetVolume"`
|
||||
TakerBuyQuoteAssetVolume float64 `json:"takerBuyQuoteAssetVolume"`
|
||||
TakerBuyBaseAssetVolume float64 `json:"takerBuyBaseAssetVolume" db:"taker_buy_base_volume"`
|
||||
TakerBuyQuoteAssetVolume float64 `json:"takerBuyQuoteAssetVolume" db:"taker_buy_quote_volume"`
|
||||
|
||||
LastTradeID uint64 `json:"lastTradeID" db:"last_trade_id"`
|
||||
NumberOfTrades uint64 `json:"numberOfTrades" db:"num_trades"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user