diff --git a/db/migrations/00040_associate_receipts_with_blocks.sql b/db/migrations/00040_associate_receipts_with_blocks.sql index dea130fb..889772ff 100644 --- a/db/migrations/00040_associate_receipts_with_blocks.sql +++ b/db/migrations/00040_associate_receipts_with_blocks.sql @@ -24,6 +24,8 @@ ALTER TABLE receipts ALTER TABLE receipts ADD COLUMN transaction_id INT; +CREATE INDEX transaction_id_index ON receipts (transaction_id); + UPDATE receipts SET transaction_id = ( SELECT id FROM transactions WHERE transactions.hash = receipts.tx_hash