Skip to content

Commit

Permalink
Merge pull request blockscout#7643 from blockscout/fix-contract-creat…
Browse files Browse the repository at this point in the history
…ion-transactions

Add addresses contract code clear to FixContractCreationTransactions …
  • Loading branch information
vbaranov authored Jun 6, 2023
2 parents baed098 + 4c75167 commit 57451bf
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ defmodule Explorer.Repo.Migrations.FixContractCreationTransactions do
use Ecto.Migration

def change do
execute("""
UPDATE addresses a
SET contract_code = NULL
FROM transactions t
WHERE t.created_contract_address_hash IS NOT NULL AND t.created_contract_address_hash = a.hash AND t.to_address_hash IS NOT NULL;
""")

execute("""
UPDATE transactions
SET created_contract_address_hash = NULL
Expand Down

0 comments on commit 57451bf

Please sign in to comment.