added smile count to tables
This commit is contained in:
parent
e39f82882b
commit
95bb85a4f6
|
@ -0,0 +1,5 @@
|
|||
class AddSmileCountToAnswers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :answers, :smile_count, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class AddSmiledCountToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :smiled_count, :integer, default: 0, null: false
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20141110210154) do
|
||||
ActiveRecord::Schema.define(version: 20141113164314) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -24,6 +24,7 @@ ActiveRecord::Schema.define(version: 20141110210154) do
|
|||
t.integer "user_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "smile_count", default: 0, null: false
|
||||
end
|
||||
|
||||
add_index "answers", ["user_id", "created_at"], name: "index_answers_on_user_id_and_created_at", using: :btree
|
||||
|
@ -78,6 +79,7 @@ ActiveRecord::Schema.define(version: 20141110210154) do
|
|||
t.integer "answered_count", default: 0, null: false
|
||||
t.integer "commented_count", default: 0, null: false
|
||||
t.string "display_name"
|
||||
t.integer "smiled_count", default: 0, null: false
|
||||
end
|
||||
|
||||
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
||||
|
|
Loading…
Reference in New Issue