Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blockscout/apps/explorer/priv/repo/migrations/20180717204948_create_balan...

16 lines
476 B

defmodule Explorer.Repo.Migrations.CreateBalances do
use Ecto.Migration
def change do
create table(:balances, primary_key: false) do
add(:address_hash, references(:addresses, column: :hash, type: :bytea), null: false)
add(:block_number, :bigint, null: false)
add(:value, :numeric, precision: 100, null: false)
timestamps(null: false, type: :utc_datetime)
end
create(unique_index(:balances, [:address_hash, :block_number]))
end
end