mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
13 lines
311 B
Ruby
13 lines
311 B
Ruby
class UpdateOrderCycleMails < ActiveRecord::Migration[6.1]
|
|
class MigrationOrderCycle < ActiveRecord::Base
|
|
self.table_name = "order_cycles"
|
|
end
|
|
|
|
def up
|
|
MigrationOrderCycle.
|
|
where(automatic_notifications: true).
|
|
where.not(processed_at: nil).
|
|
update_all(mails_sent: true)
|
|
end
|
|
end
|