-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing createdAfter queries for backfill cases (#10928)
* Testing created_after queries working with backfill * Fix in query layer * Migration script
- Loading branch information
1 parent
0c50f5d
commit f6401b5
Showing
4 changed files
with
117 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
core/store/migrate/migrations/0200_evm_logs_add_block_timestamp_index.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- +goose Up | ||
|
||
-- Start with dropping the index introduced in a previous migration - we are not going to use it | ||
DROP INDEX IF EXISTS evm.log_poller_blocks_by_timestamp; | ||
|
||
CREATE INDEX evm_logs_by_timestamp | ||
ON evm.logs (evm_chain_id, address, event_sig, block_timestamp, block_number); | ||
|
||
-- +goose Down | ||
create index log_poller_blocks_by_timestamp on evm.log_poller_blocks (evm_chain_id, block_timestamp); | ||
|
||
drop index if exists evm.evm_logs_by_timestamp; | ||
|
||
|
||
|