diff --git a/db/migrate/20171219111046_add_related_contents_positive_and_negative_score.rb b/db/migrate/20171219111046_add_related_contents_positive_and_negative_score.rb new file mode 100644 index 000000000..a40d399b8 --- /dev/null +++ b/db/migrate/20171219111046_add_related_contents_positive_and_negative_score.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 609f59c0f..014d81682 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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