Optimization:Remove Twitter Counts From User Table in db (#13208)
This commit is contained in:
parent
3b61179515
commit
8fac1b756c
3 changed files with 9 additions and 4 deletions
|
|
@ -1,6 +1,5 @@
|
|||
class User < ApplicationRecord
|
||||
resourcify
|
||||
self.ignored_columns = %w[twitter_following_count twitter_followers_count]
|
||||
|
||||
include CloudinaryHelper
|
||||
include Searchable
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
class RemoveTwitterCountsFromUser < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
safety_assured do
|
||||
remove_column :users, :twitter_following_count, :integer
|
||||
remove_column :users, :twitter_followers_count, :integer
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2021_03_26_172406) do
|
||||
ActiveRecord::Schema.define(version: 2021_03_31_181505) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "citext"
|
||||
|
|
@ -1323,8 +1323,6 @@ ActiveRecord::Schema.define(version: 2021_03_26_172406) do
|
|||
t.string "text_color_hex"
|
||||
t.string "twitch_url"
|
||||
t.datetime "twitter_created_at"
|
||||
t.integer "twitter_followers_count"
|
||||
t.integer "twitter_following_count"
|
||||
t.string "twitter_username"
|
||||
t.string "unconfirmed_email"
|
||||
t.string "unlock_token"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue