Chatwoot/db/migrate/20200802170002_reset_agent_last_seen_at.rb

7 lines
298 B
Ruby

class ResetAgentLastSeenAt < ActiveRecord::Migration[6.0]
def change
# rubocop:disable Rails/SkipsModelValidations
::Conversation.where('agent_last_seen_at > ?', DateTime.now.utc).update_all(agent_last_seen_at: DateTime.now.utc)
# rubocop:enable Rails/SkipsModelValidations
end
end