|
|
@ -2,6 +2,13 @@ defmodule Explorer.Repo.Migrations.FixContractCreationTransactions do |
|
|
|
use Ecto.Migration |
|
|
|
use Ecto.Migration |
|
|
|
|
|
|
|
|
|
|
|
def change do |
|
|
|
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(""" |
|
|
|
execute(""" |
|
|
|
UPDATE transactions |
|
|
|
UPDATE transactions |
|
|
|
SET created_contract_address_hash = NULL |
|
|
|
SET created_contract_address_hash = NULL |
|
|
|