mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
69 lines
1.2 KiB
SQL
69 lines
1.2 KiB
SQL
-- +up
|
|
|
|
-- +begin
|
|
TRUNCATE TABLE `binance_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
TRUNCATE TABLE `max_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
TRUNCATE TABLE `ftx_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
TRUNCATE TABLE `kucoin_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
TRUNCATE TABLE `okex_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
CREATE UNIQUE INDEX idx_kline_binance_unique
|
|
ON binance_klines (`symbol`, `interval`, `start_time`);
|
|
-- +end
|
|
|
|
-- +begin
|
|
CREATE UNIQUE INDEX idx_kline_max_unique
|
|
ON max_klines (`symbol`, `interval`, `start_time`);
|
|
-- +end
|
|
|
|
-- +begin
|
|
CREATE UNIQUE INDEX `idx_kline_ftx_unique`
|
|
ON ftx_klines (`symbol`, `interval`, `start_time`);
|
|
-- +end
|
|
|
|
-- +begin
|
|
CREATE UNIQUE INDEX `idx_kline_kucoin_unique`
|
|
ON kucoin_klines (`symbol`, `interval`, `start_time`);
|
|
-- +end
|
|
|
|
-- +begin
|
|
CREATE UNIQUE INDEX `idx_kline_okex_unique`
|
|
ON okex_klines (`symbol`, `interval`, `start_time`);
|
|
-- +end
|
|
|
|
-- +down
|
|
|
|
-- +begin
|
|
DROP INDEX `idx_kline_ftx_unique` ON `ftx_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
DROP INDEX `idx_kline_max_unique` ON `max_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
DROP INDEX `idx_kline_binance_unique` ON `binance_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
DROP INDEX `idx_kline_kucoin_unique` ON `kucoin_klines`;
|
|
-- +end
|
|
|
|
-- +begin
|
|
DROP INDEX `idx_kline_okex_unique` ON `okex_klines`;
|
|
-- +end
|