Skip to content

Commit

Permalink
indexer: hotfix 0013_recreate_table_transactions
Browse files Browse the repository at this point in the history
turns out, some transactions in stage were indexed twice (same hash but different ID),
this likely happened during last chain upgrade. handle this situation gracefully by
simply replacing the duplicate entries.
  • Loading branch information
altergui committed Sep 9, 2024
1 parent 4e9a11e commit 420aee2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE TABLE transactions_new (
);

-- Copy data from the old table to the new table
INSERT INTO transactions_new (hash, block_height, block_index, type)
INSERT OR REPLACE INTO transactions_new (hash, block_height, block_index, type)
SELECT hash, block_height, block_index, type
FROM transactions;

Expand Down

0 comments on commit 420aee2

Please sign in to comment.