mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
add unique index for sqlite
This commit is contained in:
parent
f9dd76d4cb
commit
04f552b169
|
@ -1,10 +1,47 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
SELECT 'up SQL query';
|
||||
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
|
||||
SELECT 'down SQL query';
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user