From 37577c25224521b7fd0ce7d813344d2af79c2183 Mon Sep 17 00:00:00 2001 From: Patrick Pfeiffer <306324+guybrush@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:57:25 +0100 Subject: [PATCH] chore(migrations): add migration for validatorindex_slot_index_withdrawals_table --- ...dd_validatorindex_slot_index_withdrawals_table.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 backend/pkg/commons/db/migrations/postgres/20241120092635_add_validatorindex_slot_index_withdrawals_table.sql diff --git a/backend/pkg/commons/db/migrations/postgres/20241120092635_add_validatorindex_slot_index_withdrawals_table.sql b/backend/pkg/commons/db/migrations/postgres/20241120092635_add_validatorindex_slot_index_withdrawals_table.sql new file mode 100644 index 000000000..5bafa95f2 --- /dev/null +++ b/backend/pkg/commons/db/migrations/postgres/20241120092635_add_validatorindex_slot_index_withdrawals_table.sql @@ -0,0 +1,11 @@ +-- +goose Up +-- +goose StatementBegin +SELECT 'creating idx_blocks_withdrawals_validatorindex_slot'; +CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_blocks_withdrawals_validatorindex_slot ON blocks_withdrawals (validatorindex, block_slot DESC); +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +SELECT 'dropping idx_blocks_withdrawals_validatorindex_slot'; +DROP INDEX CONCURRENTLY IF EXISTS idx_blocks_withdrawals_validatorindex_slot; +-- +goose StatementEnd