Used Zammad version: zammad-6.1.0-1695625218.7afd377e.centos7.x86_64
Used Zammad installation type: yum from repository
Operating system: CentOS Linux release 7.9.2009 (Core)
Browser + version: Firefox 117.0.1 (macOS)
Problem Description
Today’s yum update zammad printed out two errors, but in the end didn’t seem to (completely) fail. One error was during the database migration(?) step:
== 20230726082734 SMIMEMetaInformationTable: migrating ========================
-- change_table(:smime_certificates)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
The other later, apparently during node script/fix-node-modules.mjs:
$ node script/fix-node-modules.mjs
Done in 1.23s.
Building with Vite ⚡️
vite v4.4.9 building for production...
transforming...
✓ 1954 modules transformed.
[vite-plugin-pwa:build] "default" is not exported by "app/frontend/shared/composables/useImageViewer.ts", imported by "app/frontend/shared/components/Form/fields/FieldFile/FieldFileInput.vue?vue&type=script&setup=true&lang.ts".
file: /opt/zammad/app/frontend/shared/components/Form/fields/FieldFile/FieldFileInput.vue?vue&type=script&setup=true&lang.ts:24:7
22: import type { FormFieldContext } from '#shared/components/Form/types/field.ts'
23: import { MutationHandler } from '#shared/server/apollo/handler/index.ts'
24: import useImageViewer from '#shared/composables/useImageViewer.ts'
^
25: import { convertFileList } from '#shared/utils/files.ts'
26: import useConfirmation from '#mobile/components/CommonConfirmation/composable.ts'
error during build:
RollupError: "default" is not exported by "app/frontend/shared/composables/useImageViewer.ts", imported by "app/frontend/shared/components/Form/fields/FieldFile/FieldFileInput.vue?vue&type=script&setup=true&lang.ts".
at error (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
at Module.error (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:13674:16)
at Module.traceVariable (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:14104:29)
at ModuleScope.findVariable (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:12547:39)
at FunctionScope.findVariable (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:7082:38)
at ChildScope.findVariable (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:7082:38)
at Identifier.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:8267:40)
at CallExpression.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5850:23)
at CallExpression.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:9833:15)
at VariableDeclarator.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5850:23)
at VariableDeclaration.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5846:28)
at BlockStatement.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5846:28)
at FunctionExpression.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5850:23)
at Property.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5850:23)
at ObjectExpression.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5846:28)
at CallExpression.bind (file:///opt/zammad/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:5846:28)
pid 3399 exit 1
Build with Vite failed! ❌
I don’t know if these errors are related and what their consequence is. Cen they be ignored (I guess not) and how can they be fixed?
The most important and urgent question is: Can we continue to work before possible fixes are applied or does Zammad has to stay closed for the time being?
The complete yum update output is very long. I have provided it here.
As the error message says, the current and all following migrations are canceled, so there could be a lot of stuff missing.
So this should be checked/executed again.
About the failing assets precompile. Could you check what are the current files inside app/frontend/shared/components/Form/fields/FieldFile/ ?
What is “this” and how can I execute it again? The process was run through a regular yum update zammad process.
In the meantime we have continued to work with Zammad, as it is an essential part of our operation. We haven’t encountered problems so far and we cannot risk to loose (more?) data.
@dominikklein I tried zammad run rails c ActiveRecord::Migration.check_pending and zammad run rails c config:get ActiveRecord::Migration.check_pending. Both returned
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/thor-1.2.2/lib/thor/base.rb:525:in 'handle_argument_error': ERROR: "rails console" was called with arguments [...] (Thor::InvocationError)
and a call trace (which I can post if it is relevant). I assume this is the wrong syntax Can you help out with the full command that is required to check ActiveRecord::Migration.check_pending?
Please open up a Rails Console via zammad run rails c. After the Rails Console is ready to use, please submit following command: ActiveRecord::Migration.check_pending!
Hi,
i had the same migration error on debian, but i thought the error on my selfmade migration of mysql to postgres a few years ago.
in my case was the problem in 20230726082734_smime_meta_information_table.rb
It describes to remove the index “subject”.
The named index “subject” was not present in my postgrsql tablestructure.
So i removed the following migration definition and rerun the migration.
I checked the database after migration with adminer (https://www.adminer.org/) and everything looks good.
Mayby you run in the same problem.
at this time, it seams that no one else had this problem and so i didnt create a issue-ticket.
Thanks @datenschuft . Our situation is similar (migrated from MySQL to PostgreSQL a while ago). However even after commenting out the mentioned line in /opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb, zammad run rails db:migrate RAILS_ENV=production fails with a long trace:
$ zammad run rails db:migrate RAILS_ENV=production
== 20230726082734 SMIMEMetaInformationTable: migrating ========================
-- change_table(:smime_certificates)
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
No indexes found on smime_certificates with the options provided.
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:1411:in `index_name_for_remove'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:470:in `remove_index'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/schema_definitions.rb:711:in `remove_index'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:24:in `remove_columns'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:15:in `block in migrate_table'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:490:in `change_table'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:929:in `block in method_missing'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:897:in `block in say_with_time'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/benchmark.rb:296:in `measure'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:897:in `say_with_time'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:918:in `method_missing'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:14:in `migrate_table'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:8:in `change'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:867:in `exec_migration'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:851:in `block (2 levels) in migrate'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/benchmark.rb:296:in `measure'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:850:in `block in migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:849:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1037:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1329:in `block in execute_migration_in_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1380:in `block in ddl_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:209:in `transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1380:in `ddl_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1328:in `execute_migration_in_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1302:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1302:in `migrate_without_lock'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1251:in `block in migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1401:in `block in with_advisory_lock'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1397:in `with_advisory_lock'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1251:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1086:in `up'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1061:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:90:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/command.rb:50:in `invoke'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands.rb:18:in `<main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/bin/rails:5:in `<main>'
Caused by:
ArgumentError: No indexes found on smime_certificates with the options provided.
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:1411:in `index_name_for_remove'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:470:in `remove_index'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/schema_definitions.rb:711:in `remove_index'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:24:in `remove_columns'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:15:in `block in migrate_table'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:490:in `change_table'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:929:in `block in method_missing'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:897:in `block in say_with_time'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/benchmark.rb:296:in `measure'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:897:in `say_with_time'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:918:in `method_missing'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:14:in `migrate_table'
/opt/zammad/db/migrate/20230726082734_smime_meta_information_table.rb:8:in `change'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:867:in `exec_migration'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:851:in `block (2 levels) in migrate'
/opt/zammad/vendor/ruby-3.1.3/lib/ruby/3.1.0/benchmark.rb:296:in `measure'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:850:in `block in migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:849:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1037:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1329:in `block in execute_migration_in_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1380:in `block in ddl_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.7.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/transactions.rb:209:in `transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1380:in `ddl_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1328:in `execute_migration_in_transaction'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1302:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1302:in `migrate_without_lock'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1251:in `block in migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1401:in `block in with_advisory_lock'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1397:in `with_advisory_lock'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1251:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1086:in `up'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/migration.rb:1061:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:90:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/activerecord-6.1.7.6/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/command.rb:50:in `invoke'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/railties-6.1.7.6/lib/rails/commands.rb:18:in `<main>'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/opt/zammad/bin/rails:5:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
$
And the listed migrations are still pending.
To make it worse, since a recent upgrade to the latest 6.1.0-1701845240.5a81e629.centos7 (yum upgrade zammad), our triggers have stopped working . So any hint on how to fix this unfortunate situation are highly appreciated.
Well, your database is not correct I would say, no idea why. When you already commented one index in the aforementioned file, why not comment the other one as well and give it a try? But just to mention, this is like a hack, no guarantee that it will work or that your instance is functional afterward. Make a backup etc.
I understand that, but of course I’d rather understand (or know), what the problem is and fix it properly. Sooner or later, hacks will “fall on your feet”. I wonder if a complete reinstallation and restore of a backup would fix the issue or if it would recreate the exact same problem
The problem with backup and restore is that if the original database contains faulty data / indexes / missing stuff, then it will be migrated 1 by 1 to the new system. It’s a full database dump and a restore of said dump. Nothing that looks up the migrations etc.
Thanks for the clarification @MrGeneration since backup and restore don’t seem to be a good solution, are there other ways to (safely) try, when manual and automated migrations fail? Since we now have functional deficits, this has become quite an issue for us.