From 4c87ef44b814106687153109f8122bafeec5341b Mon Sep 17 00:00:00 2001 From: Edvard Date: Thu, 24 Jan 2019 10:35:52 +0100 Subject: [PATCH] Apply taka's fix to faulty down migration --- db/migrations/00040_associate_receipts_with_blocks.sql | 2 ++ 1 file changed, 2 insertions(+) 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