Bugfix: Use server timestamp to set agent_last_seen_at (#1114)
This commit is contained in:
7
db/migrate/20200802170002_reset_agent_last_seen_at.rb
Normal file
7
db/migrate/20200802170002_reset_agent_last_seen_at.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_07_19_171437) do
|
||||
ActiveRecord::Schema.define(version: 2020_08_02_170002) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
|
||||
Reference in New Issue
Block a user