[deploy] Add public reactions count columns (#7919)

This commit is contained in:
Andy Zhao 2020-05-18 11:34:30 -04:00 committed by GitHub
parent 6d6f7086e5
commit 45ae42f611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,8 @@
class AddPublicReactionsCountColumns < ActiveRecord::Migration[5.2]
def change
add_column :articles, :public_reactions_count, :integer, default: 0, null: false
add_column :articles, :previous_public_reactions_count, :integer, default: 0, null: false
add_column :comments, :public_reactions_count, :integer, default: 0, null: false
end
end

View file

@ -93,7 +93,9 @@ ActiveRecord::Schema.define(version: 2020_05_15_085746) do
t.string "path"
t.integer "positive_reactions_count", default: 0, null: false
t.integer "previous_positive_reactions_count", default: 0
t.integer "previous_public_reactions_count", default: 0, null: false
t.text "processed_html"
t.integer "public_reactions_count", default: 0, null: false
t.boolean "published", default: false
t.datetime "published_at"
t.boolean "published_from_feed", default: false
@ -377,6 +379,7 @@ ActiveRecord::Schema.define(version: 2020_05_15_085746) do
t.integer "markdown_character_count"
t.integer "positive_reactions_count", default: 0, null: false
t.text "processed_html"
t.integer "public_reactions_count", default: 0, null: false
t.integer "reactions_count", default: 0, null: false
t.boolean "receive_notifications", default: true
t.integer "score", default: 0