Creates a partial index using the fetched_coin_balance and hash columnspull/1140/head
parent
40a9da3022
commit
8ad5a3103e
@ -0,0 +1,13 @@ |
||||
defmodule Explorer.Repo.Migrations.AddIndexToAddresses do |
||||
use Ecto.Migration |
||||
|
||||
def up do |
||||
execute( |
||||
"CREATE INDEX addresses_fetched_coin_balance_hash_index ON addresses (fetched_coin_balance DESC, hash ASC) WHERE fetched_coin_balance > 0" |
||||
) |
||||
end |
||||
|
||||
def down do |
||||
execute("DROP INDEX addresses_fetched_coin_balance_hash_index") |
||||
end |
||||
end |
Loading…
Reference in new issue