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/20180606135149_create_token...

23 lines
493 B

defmodule Explorer.Repo.Migrations.CreateTokens do
use Ecto.Migration
def change do
create table(:tokens) do
add(:name, :string)
add(:symbol, :string)
add(:total_supply, :decimal)
add(:decimals, :smallint)
add(
:contract_address_hash,
references(:addresses, column: :hash, on_delete: :delete_all, type: :bytea),
null: false
)
timestamps()
end
create(unique_index(:tokens, :contract_address_hash))
end
end