Remove unused columns from tweets (#7128)

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
This commit is contained in:
rhymes 2020-04-07 19:19:19 +02:00 committed by GitHub
parent 9618ccc927
commit 2c0c06e23f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -1,7 +1,4 @@
class Tweet < ApplicationRecord
self.ignored_columns = %w[
primary_external_url
]
mount_uploader :profile_image, ProfileImageUploader
belongs_to :user, optional: true

View file

@ -0,0 +1,7 @@
class RemoveUnusedColumnsFromTweets < ActiveRecord::Migration[5.2]
def change
safety_assured do
remove_column :tweets, :primary_external_url, :string
end
end
end

View file

@ -1040,7 +1040,6 @@ ActiveRecord::Schema.define(version: 2020_04_07_091449) do
t.datetime "last_fetched_at"
t.text "media_serialized", default: "--- []\n"
t.string "mentioned_usernames_serialized", default: "--- []\n"
t.string "primary_external_url"
t.string "profile_image"
t.string "quoted_tweet_id_code"
t.integer "retweet_count"