Import more data about badges

This commit is contained in:
Gerhard Schlager 2024-07-10 22:02:30 +02:00 committed by cocococosti
parent b9f4f51d9d
commit 8d6ab2a098
No known key found for this signature in database
GPG Key ID: FDEE4E9ED2BD9B89
2 changed files with 17 additions and 0 deletions

View File

@ -772,6 +772,14 @@ class BulkImport::Base
updated_at
multiple_grant
query
allow_title
icon
listable
target_posts
enabled
auto_revoke
trigger
show_posts
]
USER_BADGE_COLUMNS = %i[badge_id user_id granted_at granted_by_id seq post_id created_at]

View File

@ -2344,6 +2344,15 @@ class BulkImport::Generic < BulkImport::Base
image_upload_id:
row["image_upload_id"] ? upload_id_from_original_id(row["image_upload_id"]) : nil,
query: row["query"],
multiple_grant: to_boolean(row["multiple_grant"]),
allow_title: to_boolean(row["allow_title"]),
icon: row["icon"],
listable: to_boolean(row["listable"]),
target_posts: to_boolean(row["target_posts"]),
enabled: to_boolean(row["enabled"]),
auto_revoke: to_boolean(row["auto_revoke"]),
trigger: row["trigger"],
show_posts: to_boolean(row["show_posts"]),
}
end