mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
compile and update migration package
This commit is contained in:
parent
f13e39ad1d
commit
daaa3352d7
|
@ -14,31 +14,6 @@ func init() {
|
|||
func upKlineUniqueIdx(ctx context.Context, tx rockhopper.SQLExecutor) (err error) {
|
||||
// This code is executed when the migration is applied.
|
||||
|
||||
_, err = tx.ExecContext(ctx, "TRUNCATE TABLE `binance_klines`;")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = tx.ExecContext(ctx, "TRUNCATE TABLE `max_klines`;")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = tx.ExecContext(ctx, "TRUNCATE TABLE `ftx_klines`;")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = tx.ExecContext(ctx, "TRUNCATE TABLE `kucoin_klines`;")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = tx.ExecContext(ctx, "TRUNCATE TABLE `okex_klines`;")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = tx.ExecContext(ctx, "CREATE UNIQUE INDEX idx_kline_binance_unique\n ON binance_klines (`symbol`, `interval`, `start_time`);")
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue
Block a user