Hotfix: Fix Typo in backfill_broadcastable_type_for_broadcasts (#9292) [deploy]

* Fix typo and replace .each with .find_each in broadcastable_type data_update script

* Adjust data_update script name to trigger script rerun
This commit is contained in:
Julianna Tetreault 2020-07-13 10:50:29 -06:00 committed by GitHub
parent 5f143c4308
commit 4a0784f080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -0,0 +1,9 @@
module DataUpdateScripts
class BackfillBroadcastableForBroadcasts
def run
Broadcast.where(broadcastable_type: nil).find_each do |cast|
cast.update!(broadcastable_type: cast.type_of)
end
end
end
end

View file

@ -1,9 +0,0 @@
module DataUpdateScripts
class BackfillBroadcastableTypeForBroadcasts
def run
Broadcast.where(broadcastable_type: nil).each do |cast|
cast.update!(broadcastable_type: broadcast.type_of)
end
end
end
end