Added positive and negative score columns to related contents
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
class AddRelatedContentsPositiveAndNegativeScore < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :related_contents, :flags_count
|
||||
|
||||
add_column :related_contents, :positive_score, :integer, default: 0
|
||||
add_column :related_contents, :negative_score, :integer, default: 0
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20171215152244) do
|
||||
ActiveRecord::Schema.define(version: 20171219111046) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -862,7 +862,8 @@ ActiveRecord::Schema.define(version: 20171215152244) do
|
||||
t.integer "related_content_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "flags_count", default: 0
|
||||
t.integer "positive_score", default: 0
|
||||
t.integer "negative_score", default: 0
|
||||
end
|
||||
|
||||
add_index "related_contents", ["child_relationable_type", "child_relationable_id"], name: "index_related_contents_on_child_relationable", using: :btree
|
||||
|
||||
Reference in New Issue
Block a user