Skip to content

Commit a7e3ce9

Browse files
committed
Fix incorrect class name in backfill migration
1 parent 7cdaeb3 commit a7e3ce9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

db/migrate/20240924144745_replace_param_type_and_id_with_attachment_in_messages.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def up
2323
SET attachment_id = param_id
2424
SQL
2525

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

2929
Message.in_batches do |batch|
3030
batch.includes(:attachment).find_each do |message|

0 commit comments

Comments
 (0)