mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
FIX: Category settings migration failing on '' integer (#20261)
Fixes migration introduced in a90ad52dff
,
some category custom fields like `num_auto_bump_daily` which should be
an integer are actually empty string ''.
This commit is contained in:
parent
7a593e2fb5
commit
e502175f62
|
@ -16,15 +16,15 @@ class PopulateCategorySettings < ActiveRecord::Migration[7.0]
|
|||
category_id,
|
||||
MAX(
|
||||
CASE WHEN (name = 'require_topic_approval')
|
||||
THEN value ELSE NULL END
|
||||
THEN NULLIF(value, '') ELSE NULL END
|
||||
)::boolean AS require_topic_approval,
|
||||
MAX(
|
||||
CASE WHEN (name = 'require_reply_approval')
|
||||
THEN value ELSE NULL END
|
||||
THEN NULLIF(value, '') ELSE NULL END
|
||||
)::boolean AS require_reply_approval,
|
||||
MAX(
|
||||
CASE WHEN (name = 'num_auto_bump_daily')
|
||||
THEN value ELSE NULL END
|
||||
THEN NULLIF(value, '') ELSE NULL END
|
||||
)::integer AS num_auto_bump_daily,
|
||||
NOW() AS created_at,
|
||||
NOW() AS updated_at
|
||||
|
|
Loading…
Reference in New Issue
Block a user