Skip to content

Commit

Permalink
feat: add more columns to daily statistics
Browse files Browse the repository at this point in the history
daily_dao_deposit, daily_dao_depositors_count and daily_dao_withdraw
  • Loading branch information
shaojunda committed Apr 30, 2020
1 parent 2b16d05 commit ffe1fc1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/models/daily_statistic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ class DailyStatistic < ApplicationRecord
# address_balance_distribution :jsonb
# total_tx_fee :decimal(30, )
# occupied_capacity :decimal(30, )
# daily_dao_deposit :decimal(30, )
# daily_dao_depositors_count :integer
# daily_dao_withdraw :decimal(30, )
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddDailyDaoDepositToDailyStatistics < ActiveRecord::Migration[6.0]
def change
add_column :daily_statistics, :daily_dao_deposit, :decimal, precision: 30
add_column :daily_statistics, :daily_dao_depositors_count, :integer
add_column :daily_statistics, :daily_dao_withdraw, :decimal, precision: 30
end
end
5 changes: 4 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: 2020_04_23_031220) do
ActiveRecord::Schema.define(version: 2020_04_24_084519) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -189,6 +189,9 @@
t.jsonb "address_balance_distribution"
t.decimal "total_tx_fee", precision: 30
t.decimal "occupied_capacity", precision: 30
t.decimal "daily_dao_deposit", precision: 30
t.integer "daily_dao_depositors_count"
t.decimal "daily_dao_withdraw", precision: 30
end

create_table "dao_contracts", force: :cascade do |t|
Expand Down

0 comments on commit ffe1fc1

Please sign in to comment.