mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 14:42:46 +08:00
DEV: Deprecate defunct User#flag_level column (#24134)
The User#flag_level column has not been in use for a very long time. The "new" reviewable system dynamically calculates flag scores based on past performance of the user. This PR removes flag_level from the admin user serializer (since it isn't displayed anywhere in admin user lists) and marks the column as deprecated and targeted for removal in the next minor version.
This commit is contained in:
parent
b6f9bc556e
commit
3f3d2ee2c0
|
@ -6,6 +6,7 @@ class User < ActiveRecord::Base
|
|||
include HasCustomFields
|
||||
include SecondFactorManager
|
||||
include HasDestroyedWebHook
|
||||
include HasDeprecatedColumns
|
||||
|
||||
DEFAULT_FEATURED_BADGE_COUNT = 3
|
||||
|
||||
|
@ -13,6 +14,8 @@ class User < ActiveRecord::Base
|
|||
TARGET_PASSWORD_ALGORITHM =
|
||||
"$pbkdf2-#{Rails.configuration.pbkdf2_algorithm}$i=#{Rails.configuration.pbkdf2_iterations},l=32$"
|
||||
|
||||
deprecate_column :flag_level, drop_from: "3.2"
|
||||
|
||||
# not deleted on user delete
|
||||
has_many :posts
|
||||
has_many :topics
|
||||
|
|
|
@ -14,7 +14,6 @@ class AdminUserListSerializer < BasicUserSerializer
|
|||
:created_at_age,
|
||||
:trust_level,
|
||||
:manual_locked_trust_level,
|
||||
:flag_level,
|
||||
:username,
|
||||
:title,
|
||||
:avatar_template,
|
||||
|
|
|
@ -65,9 +65,6 @@
|
|||
"null"
|
||||
]
|
||||
},
|
||||
"flag_level": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"type": [
|
||||
"string",
|
||||
|
@ -109,7 +106,6 @@
|
|||
"created_at_age",
|
||||
"trust_level",
|
||||
"manual_locked_trust_level",
|
||||
"flag_level",
|
||||
"title",
|
||||
"time_read",
|
||||
"staged",
|
||||
|
|
|
@ -46,9 +46,6 @@
|
|||
"manual_locked_trust_level": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
"flag_level": {
|
||||
"type": "integer"
|
||||
},
|
||||
"title": {
|
||||
"type": ["string", "null"]
|
||||
},
|
||||
|
@ -509,7 +506,6 @@
|
|||
"created_at_age",
|
||||
"trust_level",
|
||||
"manual_locked_trust_level",
|
||||
"flag_level",
|
||||
"title",
|
||||
"time_read",
|
||||
"staged",
|
||||
|
|
Loading…
Reference in New Issue
Block a user