I think the migrations were all started and finished successfully:
I, [2020-08-17T08:52:17.471822 #11-47384871344480] INFO -- : Setting.set('models_searchable', ["Organization", "Ticket", "KnowledgeBase::Answer::Translation", "User", "Chat::Session"])
I, [2020-08-17T08:52:18.230444 #11-47384871344480] INFO -- : Migrating to Issue2641KbColorChangeLimit (20190717210244)
== 20190717210244 Issue2641KbColorChangeLimit: migrating ======================
-- change_column(:knowledge_bases, :color_highlight, :string, {:limit=>25})
-> 0.0044s
-- change_column(:knowledge_bases, :color_header, :string, {:limit=>25})
-> 0.0014s
== 20190717210244 Issue2641KbColorChangeLimit: migrated (0.0102s) =============
I, [2020-08-17T08:52:18.276319 #11-47384871344480] INFO -- : Migrating to Issue2867FooterHeaderPublicLink (20190918114553)
== 20190918114553 Issue2867FooterHeaderPublicLink: migrating ==================
-- add_column(:knowledge_base_menu_items, :location, :string, {:null=>false, :default=>"header"})
-> 0.0044s
-- add_index(:knowledge_base_menu_items, :location)
-> 0.0682s
-- change_column_default(:knowledge_base_menu_items, :location, nil)
-> 0.0588s
== 20190918114553 Issue2867FooterHeaderPublicLink: migrated (0.1339s) =========
I, [2020-08-17T08:52:18.417905 #11-47384871344480] INFO -- : Migrating to Issue2715FixBrokenTwitterUrls (20191107181428)
== 20191107181428 Issue2715FixBrokenTwitterUrls: migrating ====================
I, [2020-08-17T08:52:18.477810 #11-47384871344480] INFO -- : Enqueued Issue2715FixBrokenTwitterUrlsJob (Job ID: a4988713-855f-4b2f-9ca4-e7cfb54640a4) to DelayedJob(default)
== 20191107181428 Issue2715FixBrokenTwitterUrls: migrated (0.0428s) ===========
I, [2020-08-17T08:52:18.481959 #11-47384871344480] INFO -- : Migrating to ActiveJobLockCleanupJobScheduler (20191129102720)
== 20191129102720 ActiveJobLockCleanupJobScheduler: migrating =================
== 20191129102720 ActiveJobLockCleanupJobScheduler: migrated (0.0114s) ========
I, [2020-08-17T08:52:18.502623 #11-47384871344480] INFO -- : Migrating to SMIMESupport (20200121000001)
== 20200121000001 SMIMESupport: migrating =====================================
-- create_table(:smime_certificates)
-> 0.1202s
-- add_index(:smime_certificates, [:fingerprint], {:unique=>true})
-> 0.0093s
-- add_index(:smime_certificates, [:modulus])
-> 0.0080s
-- add_index(:smime_certificates, [:subject])
-> 0.0076s
== 20200121000001 SMIMESupport: migrated (0.1990s) ============================
I, [2020-08-17T08:52:18.718257 #11-47384871344480] INFO -- : Migrating to ChatAddAllowWebsite (20200205000001)
== 20200205000001 ChatAddAllowWebsite: migrating ==============================
-- add_column(:chats, :whitelisted_websites, :string, {:limit=>5000, :null=>true})
-> 0.0027s
== 20200205000001 ChatAddAllowWebsite: migrated (0.0045s) =====================
I, [2020-08-17T08:52:18.730214 #11-47384871344480] INFO -- : Migrating to ServiceNowConfig (20200401000001)
== 20200401000001 ServiceNowConfig: migrating =================================
== 20200401000001 ServiceNowConfig: migrated (0.0635s) ========================
I, [2020-08-17T08:52:18.805800 #11-47384871344480] INFO -- : Migrating to Issue2990DeleteTimeframe (20200413160113)
== 20200413160113 Issue2990DeleteTimeframe: migrating =========================
== 20200413160113 Issue2990DeleteTimeframe: migrated (0.0181s) ================
I, [2020-08-17T08:52:18.835192 #11-47384871344480] INFO -- : Migrating to SettingWebsocketBackend (20200419204445)
== 20200419204445 SettingWebsocketBackend: migrating ==========================
== 20200419204445 SettingWebsocketBackend: migrated (0.0163s) =================
I, [2020-08-17T08:52:18.861391 #11-47384871344480] INFO -- : Migrating to ImapAuthenticationMigrationCleanupJobScheduler (20200507095900)
== 20200507095900 ImapAuthenticationMigrationCleanupJobScheduler: migrating ===
== 20200507095900 ImapAuthenticationMigrationCleanupJobScheduler: migrated (0.0143s)
I, [2020-08-17T08:52:18.884820 #11-47384871344480] INFO -- : Migrating to Issue3085DoorkeeperScopes (20200615150955)
== 20200615150955 Issue3085DoorkeeperScopes: migrating ========================
== 20200615150955 Issue3085DoorkeeperScopes: migrated (0.0169s) ===============
I, [2020-08-17T08:52:18.908852 #11-47384871344480] INFO -- : Migrating to Issue3087SearchTaskbarDeadlock (20200617153806)
== 20200617153806 Issue3087SearchTaskbarDeadlock: migrating ===================
== 20200617153806 Issue3087SearchTaskbarDeadlock: migrated (0.0303s) ==========
I, [2020-08-17T08:52:18.955842 #11-47384871344480] INFO -- : Migrating to Issue3110ServiceNowProvider (20200709094556)
== 20200709094556 Issue3110ServiceNowProvider: migrating ======================
== 20200709094556 Issue3110ServiceNowProvider: migrated (0.0060s) =============
I, [2020-08-17T08:52:18.970216 #11-47384871344480] INFO -- : Migrating to Issue3123ExternalSyncTicketMerge (20200716124141)
== 20200716124141 Issue3123ExternalSyncTicketMerge: migrating =================
== 20200716124141 Issue3123ExternalSyncTicketMerge: migrated (0.0160s) ========
While playing around a lot in the meantime (tried like 30 times to import the dbdump from our prod system), I’ve found the following:
- when I only import the db dump, do the migrations and start the app server again the systems start to become “unstable” in 100% of my tries - that is you cant assign ticket, cant do any changes to users/roles, you cant see your tickets anymore, etc…and it seems to getting worse with every click you make.
- when I import the db dump, do the migrations AND execute “rails zammad:db:init” (see output below) everything seems to be ok again. I dont know what exactly happens but the db:init seems to somehow solve the problem … strange.
I’ve tried it many times and I can reproduce it in 100% of the cases - after running “rails zammad:db:init” the system ist stable and without any issues.
When I dont issue the “rails zammad:db:init” command, i starts quite soon to somehow “degenerate” and become unusable.
rails zammad:db:init
I, [2020-08-17T09:32:34.588384 #20-47035630770540] INFO – : Setting.set(‘models_searchable’, [“Organization”, “Ticket”, “KnowledgeBase::Answer::Translation”, “User”, “Chat::Session”])
Database ‘zammad_prod’ already exists
I, [2020-08-17T09:32:36.265954 #20-47035630770540] INFO – : Enqueued SearchIndexJob (Job ID: 9f812cc7-7c88-45a3-b5e6-72606e261f08) to DelayedJob(default) with arguments: “User”, 2
I, [2020-08-17T09:32:36.276299 #20-47035630770540] INFO – : Enqueued SearchIndexAssociationsJob (Job ID: beb88dfa-5e6d-4ac9-a63b-19125d05ce08) to DelayedJob(default) with arguments: “User”, 2
I, [2020-08-17T09:33:47.525076 #20-47035630770540] INFO – : Enqueued SlaTicketRebuildEscalationJob (Job ID: 438e33ec-3e24-4196-8cea-8071aeeeaa6f) to DelayedJob(default)
I, [2020-08-17T09:33:47.571138 #20-47035630770540] INFO – : Won’t enqueue SlaTicketRebuildEscalationJob (Job ID: 97df5146-e380-4a79-a84d-b5a2f4cad4a0) because of already existing job with lock key ‘SlaTicketRebuildEscalationJob’.
I, [2020-08-17T09:33:47.573516 #20-47035630770540] INFO – : Enqueued SlaTicketRebuildEscalationJob (Job ID: 97df5146-e380-4a79-a84d-b5a2f4cad4a0) to DelayedJob(default)
To me this seems like there is maybe a missing migration oder something?
I’ve also made a diff on the zammad 3.2 db schema vs. zammad 3.4 db schema but could not find any difference here.
For the moment the “rails zammad:db:init” seems to solve my problem - although I’m still uncertain about what exactly was causing the problem.