fix: migration script to run on all reporting events (#6590)

* fix: migration script to run on all reporting events

* fix: don't update user_id if it is already present

* refactor: create a new migration

* feat: update schema

* feat: ignore events with bot handoff

* feat: prefetch conversations with handoff events

* Revert "feat: update schema"

This reverts commit 25ed2856e62655f5f1db14fd0cffad3a69d0b1fb.

* feat: update schema

* refactor: separate method get_conversations_with_bot_handoffs

* refactor: cognitive complexity

* refactor: early return if last_bot_reply is blank

* feat: add async_database_migration queue

* feat: update queue priority
This commit is contained in:
Shivam Mishra
2023-03-02 19:03:31 +05:30
committed by GitHub
parent b185059681
commit a6405ea339
5 changed files with 40 additions and 26 deletions

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2023_02_24_124632) do
ActiveRecord::Schema.define(version: 2023_03_02_054408) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"