From a90b16e1b1e73ecb3364534824a2a7b32fe038d2 Mon Sep 17 00:00:00 2001 From: LexLuthr <88259624+LexLuthr@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:35:22 +0530 Subject: [PATCH] add indexes to deals DB (#1857) --- ...ndex.sql => 20231222114605_add_sectorid_index.sql} | 0 db/migrations/20231222114645_add_deal_index.sql | 11 +++++++++++ 2 files changed, 11 insertions(+) rename db/migrations/{202312210049_add_sectorid_index.sql => 20231222114605_add_sectorid_index.sql} (100%) create mode 100644 db/migrations/20231222114645_add_deal_index.sql diff --git a/db/migrations/202312210049_add_sectorid_index.sql b/db/migrations/20231222114605_add_sectorid_index.sql similarity index 100% rename from db/migrations/202312210049_add_sectorid_index.sql rename to db/migrations/20231222114605_add_sectorid_index.sql diff --git a/db/migrations/20231222114645_add_deal_index.sql b/db/migrations/20231222114645_add_deal_index.sql new file mode 100644 index 000000000..9cfaeadf1 --- /dev/null +++ b/db/migrations/20231222114645_add_deal_index.sql @@ -0,0 +1,11 @@ +-- +goose Up +-- +goose StatementBegin +CREATE INDEX IF NOT EXISTS index_deals_piece_cid on Deals(PieceCID); +CREATE INDEX IF NOT EXISTS index_deals_checkpoint on Deals(Checkpoint); +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +DROP INDEX IF EXISTS index_deals_piece_cid; +DROP INDEX IF EXISTS index_deals_checkpoint; +-- +goose StatementEnd