From 5c0a8d5bb54fc35b51ebd6611ab124e5d342cb47 Mon Sep 17 00:00:00 2001 From: Amanda Sposito Date: Thu, 15 Nov 2018 16:58:50 -0200 Subject: [PATCH] Remove old task to migrate data --- .../lib/mix/tasks/migrate.transaction.info.ex | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 apps/explorer/lib/mix/tasks/migrate.transaction.info.ex diff --git a/apps/explorer/lib/mix/tasks/migrate.transaction.info.ex b/apps/explorer/lib/mix/tasks/migrate.transaction.info.ex deleted file mode 100644 index 58121d03e6..0000000000 --- a/apps/explorer/lib/mix/tasks/migrate.transaction.info.ex +++ /dev/null @@ -1,32 +0,0 @@ -defmodule Mix.Tasks.Migrate.Transaction.Info do - use Mix.Task - - alias Ecto.Adapters.SQL - alias Explorer.Repo - - @shortdoc "Migrates transaction info to internal transaction" - - @moduledoc """ - This task is reponsible to populate the `transaction_index` and - `block_number` at the `internal_transactions` table, using the - `transactions` info. - """ - - def run(_args) do - {:ok, _} = Application.ensure_all_started(:explorer) - - SQL.query( - Repo, - """ - UPDATE internal_transactions - SET - block_number = transactions.block_number, - transaction_index = transactions.index - FROM transactions - WHERE internal_transactions.transaction_hash = transactions.hash; - """, - [], - timeout: :infinity - ) - end -end