Skip to content

Commit

Permalink
Fix incorrect class name in backfill migration
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSerth committed Nov 16, 2024
1 parent 7cdaeb3 commit a7e3ce9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def up
SET attachment_id = param_id
SQL

Message.where(param_type: 'collection').update_all(attachment_type: Collection.name) # rubocop:disable Rails/SkipsModelValidations
Message.where(param_type: GROUP_TYPES).update_all(attachment_type: Group.name) # rubocop:disable Rails/SkipsModelValidations
Message.where(param_type: 'collection').update_all(attachment_type: Collection.name.demodulize) # rubocop:disable Rails/SkipsModelValidations
Message.where(param_type: GROUP_TYPES).update_all(attachment_type: Group.name.demodulize) # rubocop:disable Rails/SkipsModelValidations

Message.in_batches do |batch|
batch.includes(:attachment).find_each do |message|
Expand Down

0 comments on commit a7e3ce9

Please sign in to comment.