add indexes for token instances fetching queries

Without these indexes the query can not be finished.

But on staging requests for `tokenURI` are timing out.
That's why we have so many records with empty metadata.
pull/2761/head
Ayrat Badykov 5 years ago
parent 766abfc82d
commit 2de98bf627
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 8
      apps/explorer/priv/repo/migrations/20191007082500_add_indexes_for_token_instances_query.exs

@ -0,0 +1,8 @@
defmodule Explorer.Repo.Migrations.AddIndexesForTokenInstrancesQuery do
use Ecto.Migration
def change do
create_if_not_exists(index(:token_instances, [:token_id]))
create_if_not_exists(index(:tokens, [:type]))
end
end
Loading…
Cancel
Save