Skip to content

Commit

Permalink
feat: add live_cells_count to addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Dec 19, 2019
1 parent 50a4ee0 commit 34de215
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def special?
# interest :decimal(30, ) default(0)
# block_timestamp :decimal(30, )
# visible :boolean default(TRUE)
# live_cells_count :decimal(30, ) default(0)
#
# Indexes
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddLiveCellsCountToAddresses < ActiveRecord::Migration[6.0]
def change
add_column :addresses, :live_cells_count, :decimal, precision: 30, scale: 0, default: 0
end
end
1 change: 1 addition & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
t.decimal "interest", precision: 30, default: "0"
t.decimal "block_timestamp", precision: 30
t.boolean "visible", default: true
t.decimal "live_cells_count", 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 34de215

Please sign in to comment.