Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertz committed Jun 12, 2015
1 parent bb6bb9c commit 901cb71
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 14 deletions.
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,3 @@ DEPENDENCIES
weixin_authorize
weixin_rails_middleware
whenever

BUNDLED WITH
1.10.2
3 changes: 0 additions & 3 deletions app/models/material.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ def self.by_url url
m
end

add_column :materials, :team_psersons, :integer
add_column :materials, :one_percent, :float

# 如果活动类型是团队接力模式
# rest --> 剩余份额
# num ---> 要分的人数
Expand Down
9 changes: 9 additions & 0 deletions db/migrate/20150607071349_add_index_to_authentications.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class AddIndexToAuthentications < ActiveRecord::Migration
def change
add_index :authentications, :uid
add_index :authentications, :user_id
add_index :authentications, :appid
add_index :authentications, :groupid

end
end
37 changes: 29 additions & 8 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150610094023) do
ActiveRecord::Schema.define(version: 20150612013512) do

create_table "ads", force: true do |t|
t.string "title"
Expand Down Expand Up @@ -65,7 +65,11 @@
t.string "groupid"
end

add_index "authentications", ["appid"], name: "index_authentications_on_appid", using: :btree
add_index "authentications", ["groupid"], name: "index_authentications_on_groupid", using: :btree
add_index "authentications", ["uid"], name: "index_authentications_on_uid", using: :btree
add_index "authentications", ["unionid"], name: "index_authentications_on_unionid", using: :btree
add_index "authentications", ["user_id"], name: "index_authentications_on_user_id", using: :btree

create_table "banners", force: true do |t|
t.integer "wait", default: 1, null: false
Expand Down Expand Up @@ -201,6 +205,7 @@
t.datetime "updated_at"
t.integer "game_id"
t.datetime "last_notice_time"
t.integer "new_state"
end

add_index "checks", ["beaconid"], name: "index_checks_on_beaconid", using: :btree
Expand Down Expand Up @@ -350,11 +355,16 @@
t.integer "object_id"
t.integer "beacon_id"
t.string "pyq_url"
t.integer "team_persons"
t.float "one_percent"
t.integer "team_reward"
t.integer "party_id"
end

add_index "materials", ["docid"], name: "index_materials_on_docid", using: :btree
add_index "materials", ["is_qq"], name: "index_materials_on_is_qq", using: :btree
add_index "materials", ["is_recommend_to_qq"], name: "index_materials_on_is_recommend_to_qq", using: :btree
add_index "materials", ["party_id"], name: "index_materials_on_party_id", using: :btree
add_index "materials", ["redis_pv"], name: "index_materials_on_redis_pv", using: :btree
add_index "materials", ["redis_wx_share_pyq"], name: "index_materials_on_redis_wx_share_pyq", using: :btree
add_index "materials", ["rrr"], name: "index_materials_on_rrr", using: :btree
Expand Down Expand Up @@ -433,6 +443,8 @@
t.datetime "updated_at"
end

add_index "parties", ["openid"], name: "index_parties_on_openid", length: {"openid"=>191}, using: :btree

create_table "partyinfos", force: true do |t|
t.string "logo"
t.string "name"
Expand Down Expand Up @@ -461,14 +473,14 @@
end

add_index "payments", ["created_at"], name: "index_payments_on_created_at", using: :btree
add_index "payments", ["mchid", "openid", "created_at", "payment_no"], name: "index_payments_on_mchid_and_openid_and_created_at_and_payment_no", using: :btree
add_index "payments", ["mchid", "openid", "created_at"], name: "index_payments_on_mchid_and_openid_and_created_at", using: :btree
add_index "payments", ["mchid", "openid", "payment_no"], name: "index_payments_on_mchid_and_openid_and_payment_no", using: :btree
add_index "payments", ["mchid", "openid"], name: "index_payments_on_mchid_and_openid", using: :btree
add_index "payments", ["mchid"], name: "index_payments_on_mchid", using: :btree
add_index "payments", ["mchid", "openid", "created_at", "payment_no"], name: "index_payments_on_mchid_and_openid_and_created_at_and_payment_no", length: {"mchid"=>191, "openid"=>191, "created_at"=>nil, "payment_no"=>191}, using: :btree
add_index "payments", ["mchid", "openid", "created_at"], name: "index_payments_on_mchid_and_openid_and_created_at", length: {"mchid"=>191, "openid"=>191, "created_at"=>nil}, using: :btree
add_index "payments", ["mchid", "openid", "payment_no"], name: "index_payments_on_mchid_and_openid_and_payment_no", length: {"mchid"=>191, "openid"=>191, "payment_no"=>191}, using: :btree
add_index "payments", ["mchid", "openid"], name: "index_payments_on_mchid_and_openid", length: {"mchid"=>191, "openid"=>191}, using: :btree
add_index "payments", ["mchid"], name: "index_payments_on_mchid", length: {"mchid"=>191}, using: :btree
add_index "payments", ["money"], name: "index_payments_on_money", using: :btree
add_index "payments", ["openid"], name: "index_payments_on_openid", using: :btree
add_index "payments", ["payment_no"], name: "index_payments_on_payment_no", using: :btree
add_index "payments", ["openid"], name: "index_payments_on_openid", length: {"openid"=>191}, using: :btree
add_index "payments", ["payment_no"], name: "index_payments_on_payment_no", length: {"payment_no"=>191}, using: :btree

create_table "posts", force: true do |t|
t.string "title"
Expand Down Expand Up @@ -541,6 +553,7 @@
t.integer "allocation"
t.string "card_id"
t.integer "feedback"
t.integer "material_id"
end

add_index "records", ["beaconid", "score"], name: "index_records_on_beaconid_and_score", using: :btree
Expand Down Expand Up @@ -658,6 +671,14 @@
t.datetime "updated_at"
end

add_index "teamworks", ["created_at"], name: "index_teamworks_on_created_at", using: :btree
add_index "teamworks", ["material_id"], name: "index_teamworks_on_material_id", using: :btree
add_index "teamworks", ["sponsor", "material_id", "state", "created_at"], name: "index_teamwoks_sponsor_state", using: :btree
add_index "teamworks", ["sponsor", "material_id", "state"], name: "index_teamworks_on_sponsor_and_material_id_and_state", using: :btree
add_index "teamworks", ["sponsor", "material_id"], name: "index_teamworks_on_sponsor_and_material_id", using: :btree
add_index "teamworks", ["sponsor"], name: "index_teamworks_on_sponsor", using: :btree
add_index "teamworks", ["state"], name: "index_teamworks_on_state", using: :btree

create_table "time_amounts", force: true do |t|
t.datetime "time"
t.integer "amount"
Expand Down

0 comments on commit 901cb71

Please sign in to comment.