mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
DEV: Deprecate array custom fields (#24492)
Array custom fields use separate rows for each value, but whenever we update an array, we have always destroy the existing rows and create new ones. Therefore, there's no benefit over using the json type.
This commit is contained in:
parent
b3c67a78b8
commit
ced21fa5c1
@ -87,6 +87,13 @@ module HasCustomFields
|
||||
end
|
||||
|
||||
def register_custom_field_type(name, type)
|
||||
if Array === type
|
||||
Discourse.deprecate(
|
||||
"Array types for custom fields are deprecated, use type :json instead",
|
||||
drop_from: "3.3.0",
|
||||
)
|
||||
end
|
||||
|
||||
@custom_field_types ||= {}
|
||||
@custom_field_types[name] = type
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user