Merge pull request #139 from 8thlight/fix-migration-rollback
bring back transaction_id index when adding back transaction_id column
This commit is contained in:
commit
c24a073ff7
@ -3,6 +3,8 @@ BEGIN;
|
||||
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
|
||||
@ -20,4 +22,4 @@ ON DELETE CASCADE;
|
||||
ALTER TABLE receipts
|
||||
DROP COLUMN block_id;
|
||||
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
Loading…
Reference in New Issue
Block a user