From f9c0ed599eb2bdb6c6ba37e58f7471eaf2e7a200 Mon Sep 17 00:00:00 2001 From: Nick <148735107+nick-bisonai@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:30:00 +0900 Subject: [PATCH] (OraklNode) Add missing index (#2170) * feat: add missing indexes * fix: fix based on feedback --- node/migrations/node/000033_feed_data_index.down.sql | 2 ++ node/migrations/node/000033_feed_data_index.up.sql | 2 ++ node/migrations/node/000034_feeds_index.down.sql | 1 + node/migrations/node/000034_feeds_index.up.sql | 1 + 4 files changed, 6 insertions(+) create mode 100644 node/migrations/node/000033_feed_data_index.down.sql create mode 100644 node/migrations/node/000033_feed_data_index.up.sql create mode 100644 node/migrations/node/000034_feeds_index.down.sql create mode 100644 node/migrations/node/000034_feeds_index.up.sql diff --git a/node/migrations/node/000033_feed_data_index.down.sql b/node/migrations/node/000033_feed_data_index.down.sql new file mode 100644 index 000000000..9fa6a2c9d --- /dev/null +++ b/node/migrations/node/000033_feed_data_index.down.sql @@ -0,0 +1,2 @@ +DROP INDEX IF EXISTS feed_data_feed_id_idx; +DROP INDEX IF EXISTS feed_data_timestamp_idx; \ No newline at end of file diff --git a/node/migrations/node/000033_feed_data_index.up.sql b/node/migrations/node/000033_feed_data_index.up.sql new file mode 100644 index 000000000..9f0384365 --- /dev/null +++ b/node/migrations/node/000033_feed_data_index.up.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS feed_data_feed_id_idx ON feed_data(feed_id); +CREATE INDEX IF NOT EXISTS feed_data_timestamp_idx ON feed_data(timestamp); \ No newline at end of file diff --git a/node/migrations/node/000034_feeds_index.down.sql b/node/migrations/node/000034_feeds_index.down.sql new file mode 100644 index 000000000..22452ff72 --- /dev/null +++ b/node/migrations/node/000034_feeds_index.down.sql @@ -0,0 +1 @@ +DROP INDEX IF EXISTS feeds_config_id_idx; \ No newline at end of file diff --git a/node/migrations/node/000034_feeds_index.up.sql b/node/migrations/node/000034_feeds_index.up.sql new file mode 100644 index 000000000..6cf4fb560 --- /dev/null +++ b/node/migrations/node/000034_feeds_index.up.sql @@ -0,0 +1 @@ +CREATE INDEX IF NOT EXISTS feeds_config_id_idx ON feeds(config_id); \ No newline at end of file