|
|
|
@ -12,15 +12,16 @@ defmodule Explorer.Repo.Migrations.AddTransactionActionsTable do |
|
|
|
|
"DROP TYPE transaction_actions_type" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
create table(:transaction_actions) do |
|
|
|
|
create table(:transaction_actions, primary_key: false) do |
|
|
|
|
add(:hash, references(:transactions, column: :hash, on_delete: :delete_all, on_update: :update_all, type: :bytea), |
|
|
|
|
null: false |
|
|
|
|
null: false, |
|
|
|
|
primary_key: true |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
add(:protocol, :transaction_actions_protocol, null: false) |
|
|
|
|
add(:data, :map, default: %{}, null: false) |
|
|
|
|
add(:type, :transaction_actions_type, null: false) |
|
|
|
|
add(:log_index, :integer, null: false) |
|
|
|
|
add(:log_index, :integer, null: false, primary_key: true) |
|
|
|
|
|
|
|
|
|
timestamps(null: false, type: :utc_datetime_usec) |
|
|
|
|
end |
|
|
|
|