Fix block_hash is null statement

pull/1385/head
Andrew Cravenho 6 years ago
parent f71228884c
commit c0ac367960
  1. 4
      apps/explorer/priv/repo/migrations/scripts/update_replaced_transaction.sql

@ -3,7 +3,7 @@ DO $$
total_count integer := 0; total_count integer := 0;
completed_count integer := 0; completed_count integer := 0;
remaining_count integer := 0; remaining_count integer := 0;
batch_size integer := 1000; batch_size integer := 10;
iterator integer := batch_size; iterator integer := batch_size;
updated_count integer; updated_count integer;
deleted_count integer; deleted_count integer;
@ -57,7 +57,7 @@ DO $$
WHERE transactions_dropped_replaced.row_number <= iterator AND WHERE transactions_dropped_replaced.row_number <= iterator AND
transactions_dropped_replaced.nonce = transactions.nonce AND transactions_dropped_replaced.nonce = transactions.nonce AND
transactions_dropped_replaced.from_address_hash = transactions.from_address_hash AND transactions_dropped_replaced.from_address_hash = transactions.from_address_hash AND
transactions.block_hash IS NOT NULL; transactions.block_hash IS NULL;
GET DIAGNOSTICS updated_count = ROW_COUNT; GET DIAGNOSTICS updated_count = ROW_COUNT;
RAISE NOTICE '-> % transaction counts updated.', updated_count; RAISE NOTICE '-> % transaction counts updated.', updated_count;

Loading…
Cancel
Save