Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Error during update from 12.5.8 -> 13.0.0

Error during update from 12.5.8 -> 13.0.0

Added by Tri Tri over 1 year ago

Hi @all,

when running sudo openproject configure  an error occurs (see below).

Any help is appreciated.

Thank you.

I, [2023-08-22T09:11:12.194948 #7998]  INFO -- : Migrating to MergeWikiContentIntoPage (20230322135932)
== 20230322135932 MergeWikiContentIntoPage: migrating =========================
-- change_table(:wiki_pages, {:bulk=>true})
   -> 0.0157s
-- add_index(:wiki_pages, :updated_at)
   -> 0.0032s
-- execute("UPDATE wiki_pages SET text = wiki_contents.text, author_id = wiki_contents.author_id, lock_version = wiki_contents.lock_version FROM wiki_contents WHERE wiki_contents.page_id = wiki_pages.id")
   -> 0.0033s
-- execute("UPDATE journals SET journable_id = wiki_contents.page_id, journable_type = 'WikiPage', data_type = 'Journal::WikiPageJournal' FROM wiki_contents WHERE journals.journable_id = wiki_contents.id AND journals.journable_type = 'WikiContent' AND journals.data_type = 'Journal::WikiContentJournal'")
   -> 0.0189s
-- change_column_null(:wiki_pages, :lock_version, false)
   -> 0.0004s
-- change_column_null(:wiki_pages, :author_id, false)
   -> 0.0003s
-- drop_table(:wiki_contents)
   -> 0.0015s
-- rename_table(:wiki_content_journals, :wiki_page_journals)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: FEHLER:  Relation »wiki_content_journals_pkey« existiert nicht
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/schema_statements.rb:387:in `rename_table'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:932:in `block in method_missing'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:900:in `block in say_with_time'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:900:in `say_with_time'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:921:in `method_missing'
/opt/openproject/db/migrate/20230322135932_merge_wiki_content_into_page.rb:108:in `rename_and_adapt_journal_data'
/opt/openproject/db/migrate/20230322135932_merge_wiki_content_into_page.rb:53:in `change'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:870:in `exec_migration'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:854:in `block (2 levels) in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:853:in `block in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:852:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1046:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1360:in `block in execute_migration_in_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/transactions.rb:209:in `transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1411:in `ddl_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1359:in `execute_migration_in_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1333:in `each'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1333:in `migrate_without_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1282:in `block in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1432:in `block in with_advisory_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1447:in `with_advisory_lock_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1428:in `with_advisory_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1282:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1117:in `up'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1092:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/openproject/bin/bundle:110:in `load'
/opt/openproject/bin/bundle:110:in `<main>'

Caused by:
ActiveRecord::StatementInvalid: PG::UndefinedTable: FEHLER:  Relation »wiki_content_journals_pkey« existiert nicht
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/schema_statements.rb:387:in `rename_table'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:932:in `block in method_missing'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:900:in `block in say_with_time'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:900:in `say_with_time'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:921:in `method_missing'
/opt/openproject/db/migrate/20230322135932_merge_wiki_content_into_page.rb:108:in `rename_and_adapt_journal_data'
/opt/openproject/db/migrate/20230322135932_merge_wiki_content_into_page.rb:53:in `change'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:870:in `exec_migration'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:854:in `block (2 levels) in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:853:in `block in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:852:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1046:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1360:in `block in execute_migration_in_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/transactions.rb:209:in `transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1411:in `ddl_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1359:in `execute_migration_in_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1333:in `each'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1333:in `migrate_without_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1282:in `block in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1432:in `block in with_advisory_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1447:in `with_advisory_lock_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1428:in `with_advisory_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1282:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1117:in `up'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1092:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/openproject/bin/bundle:110:in `load'
/opt/openproject/bin/bundle:110:in `<main>'

Caused by:
PG::UndefinedTable: FEHLER:  Relation »wiki_content_journals_pkey« existiert nicht
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:47:in `block in execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:752:in `block in log'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:743:in `log'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:46:in `execute'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql/schema_statements.rb:387:in `rename_table'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:932:in `block in method_missing'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:900:in `block in say_with_time'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:900:in `say_with_time'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:921:in `method_missing'
/opt/openproject/db/migrate/20230322135932_merge_wiki_content_into_page.rb:108:in `rename_and_adapt_journal_data'
/opt/openproject/db/migrate/20230322135932_merge_wiki_content_into_page.rb:53:in `change'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:870:in `exec_migration'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:854:in `block (2 levels) in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:853:in `block in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:852:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1046:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1360:in `block in execute_migration_in_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/transactions.rb:209:in `transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1411:in `ddl_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1359:in `execute_migration_in_transaction'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1333:in `each'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1333:in `migrate_without_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1282:in `block in migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1432:in `block in with_advisory_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1447:in `with_advisory_lock_connection'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1428:in `with_advisory_lock'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1282:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1117:in `up'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/migration.rb:1092:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/opt/openproject/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/opt/openproject/bin/bundle:110:in `load'
/opt/openproject/bin/bundle:110:in `<main>'

Replies (5)

RE: Error during update from 12.5.8 -> 13.0.0 - Added by Florian I over 1 year ago

Good day,

same error on our installation during openproject configure :

Relation »wiki_content_journals_pkey« existiert nicht.

RE: RE: Error during update from 12.5.8 -> 13.0.0 - Added by Florian I over 1 year ago

Seems like we don't get any attention here. Did you find a solution for it?

RE: Error during update from 12.5.8 -> 13.0.0 - Added by Tri Tri over 1 year ago

Not yet, Florian.
maybe someone is working on it. maybe not. Does anyone want to bet? ;)
Soo let's wait for 13.0.3+ (because 13.0.2 doesn't fix that migration issue either).

RE: Error during update from 12.5.8 -> 13.0.0 - Added by Tri Tri over 1 year ago

--> https://community.openproject.org/projects/openproject/work_packages/50003/activity

RE: Error during update from 12.5.8 -> 13.0.0 - Added by Oliver Günther over 1 year ago

Hi everyone, sorry to hear you're experiencing issues during the upgrade. The error of user Tri Tri was caused by an older migration of MySQL to PostgreSQL and twofold.

Before starting these steps, please ensure you have a backup of your database at hand. The steps should be safe (i.e., a no-op ) if you are not affected by the MySQL remnants though.

1. The primary key index names were still in a MySQL format, meaning Rails will not find the primary key name as it's quite dumb trying to construct the name

To fix this in a packaged installation run:

sudo openproject run bundle exec rake db:migrate:redo VERSION=20190502102512

To fix this in a docker installation run:

docker exec -it $container_id bundle exec rake db:migrate:redo VERSION=20190502102512

2. There were two database schemas in the database, resulting in OpenProject possibly not choosing the correct schema to migrate.

To fix this, connect to the database.

In a packaged installation psql $(openproject config:get DATABASE_URL)

In a docker installation, connect manually to the DB container .

Execute the following statement:

CREATE OR REPLACE FUNCTION move_schema_to_public(old_schema varchar) RETURNS void LANGUAGE plpgsql VOLATILE AS
$$
DECLARE
    row record;
BEGIN
    FOR row IN SELECT tablename FROM pg_tables WHERE schemaname = quote_ident(old_schema)
    LOOP
        EXECUTE 'ALTER TABLE ' || quote_ident(old_schema) || '.' || quote_ident(row.tablename) || ' SET SCHEMA public;';
    END LOOP;
END;
$$;

SELECT * FROM move_schema_to_public('openproject');
  • (1 - 5/5)
Loading...