Skip to content

Commit

Permalink
feat: add dao_deposit and subsidy to addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Oct 9, 2019
1 parent a96655d commit 9409d57
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def flush_cache
# updated_at :datetime not null
# lock_hash :binary
# pending_reward_blocks_count :integer default(0)
# dao_deposit :decimal(30, ) default(0)
# subsidy :decimal(30, ) default(0)
#
# Indexes
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddDaoDepositAndSubsidyToAddresses < ActiveRecord::Migration[6.0]
def change
add_column :addresses, :dao_deposit, :decimal, precision: 30, scale: 0, default: 0
add_column :addresses, :subsidy, :decimal, precision: 30, scale: 0, default: 0
end
end
4 changes: 3 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2019_10_04_060003) do
ActiveRecord::Schema.define(version: 2019_10_09_075035) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand All @@ -33,6 +33,8 @@
t.datetime "updated_at", null: false
t.binary "lock_hash"
t.integer "pending_reward_blocks_count", default: 0
t.decimal "dao_deposit", precision: 30, default: "0"
t.decimal "subsidy", precision: 30, default: "0"
t.index ["address_hash"], name: "index_addresses_on_address_hash"
t.index ["lock_hash"], name: "index_addresses_on_lock_hash", unique: true
end
Expand Down

0 comments on commit 9409d57

Please sign in to comment.