status-go/walletdatabase/migrations/sql/1701101493_add_token_blocks_range.up.sql
Ivan Belyakov 82185b54b5 feat(wallet): separate ETH and tokens search ranges to allow calling
`getLogs` for multiple accounts simultaneously. For now only used for
new transfers detection. Detection of `new` transfers has been changed,
now they are searched from head and forward. Previously they were
searched from last scanned block forward.
2023-12-05 16:09:56 +01:00

10 lines
469 B
SQL

-- Add columns
ALTER TABLE blocks_ranges_sequential ADD COLUMN token_blk_start BIGINT DEFAULT 0;
ALTER TABLE blocks_ranges_sequential ADD COLUMN token_blk_first BIGINT DEFAULT 0;
ALTER TABLE blocks_ranges_sequential ADD COLUMN token_blk_last BIGINT DEFAULT 0;
-- Copy values
UPDATE blocks_ranges_sequential SET token_blk_start = blk_start;
UPDATE blocks_ranges_sequential SET token_blk_first = blk_first;
UPDATE blocks_ranges_sequential SET token_blk_last = blk_last;