Skip to content

Commit

Permalink
feat: add mining info
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Dec 19, 2019
1 parent 301ee15 commit 4e4d1e9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/models/mining_info.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class MiningInfo < ApplicationRecord
end

# == Schema Information
#
# Table name: mining_infos
#
# id :bigint not null, primary key
# address_id :bigint
# block_id :bigint
# status :integer default(0)
# created_at :datetime not null
# updated_at :datetime not null
#
11 changes: 11 additions & 0 deletions db/migrate/20191206042241_create_mining_infos.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateMiningInfos < ActiveRecord::Migration[6.0]
def change
create_table :mining_infos do |t|
t.bigint :address_id
t.bigint :block_id
t.integer :status, limit: 1, default: "0"

t.timestamps
end
end
end
8 changes: 8 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@
t.index ["cell_output_id"], name: "index_lock_scripts_on_cell_output_id"
end

create_table "mining_infos", force: :cascade do |t|
t.bigint "address_id"
t.bigint "block_id"
t.integer "status", limit: 2, default: 0
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end

create_table "type_scripts", force: :cascade do |t|
t.string "args"
t.binary "code_hash"
Expand Down

0 comments on commit 4e4d1e9

Please sign in to comment.