Run BackfillColumnForBroadcasts only if the column still exists (#6508)
This commit is contained in:
parent
20b6c77875
commit
ed66d7b181
1 changed files with 2 additions and 0 deletions
|
|
@ -1,6 +1,8 @@
|
|||
module DataUpdateScripts
|
||||
class BackfillColumnForBroadcasts
|
||||
def run
|
||||
return unless Broadcast.column_names.include?("sent")
|
||||
|
||||
Broadcast.find_each { |broadcast| broadcast.update!(active: broadcast.sent) }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue