mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Remove badge_granted_title column from user_profiles (#20476)
That column is obsolete since we added the `granted_title_badge_id` column in 2019 (56d3e29a69). Having both columns can lead to inconsistencies (mostly due to old data from before 2019).
For example, `BadgeGranter.revoke_ungranted_titles!` doesn't work correctly if `badge_granted_title` is `false` while `granted_title_badge_id` points to the badge that is used as title.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class UserProfile < ActiveRecord::Base
|
||||
# TODO Remove `badge_granted_title` after 2023-09-01
|
||||
self.ignored_columns = ["badge_granted_title"]
|
||||
|
||||
BAKED_VERSION = 1
|
||||
|
||||
belongs_to :user, inverse_of: :user_profile
|
||||
@@ -227,7 +230,6 @@ end
|
||||
# bio_cooked :text
|
||||
# dismissed_banner_key :integer
|
||||
# bio_cooked_version :integer
|
||||
# badge_granted_title :boolean default(FALSE)
|
||||
# views :integer default(0), not null
|
||||
# profile_background_upload_id :integer
|
||||
# card_background_upload_id :integer
|
||||
|
||||
Reference in New Issue
Block a user