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. Upgrade from 6.1 to 7.4.7 fail with db migration error

Upgrade from 6.1 to 7.4.7 fail with db migration error

Added by Jedi Jiang about 6 years ago

Hello,

My openproject version is 6.1 running in docker (through the official procedure) , yesterday, I try to upgrade the openproject from 6.1 to 7.4.7, the upgrading failed with db migration error.

# ...
	-- add_index("issue_categories", ["project_id"], {:name=>"issue_categories_project_id"})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR:  relation "issue_categories_project_id" already exists
: CREATE  INDEX  "issue_categories_project_id" ON "issue_categories"  ("project_id")
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/usr/local/bundle/gems/activesupport-5.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/connection_adapters/postgresql/schema_statements.rb:558:in `add_index'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/migration.rb:846:in `block in method_missing'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `block in say_with_time'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/migration.rb:815:in `say_with_time'
/usr/local/bundle/gems/activerecord-5.0.6/lib/active_record/migration.rb:835:in `method_missing'
/usr/src/app/db/migrate/000_aggregated_migrations.rb:468:in `run_aggregated_migrations'
/usr/src/app/db/migrate/000_aggregated_migrations.rb:241:in `up'
# ....

I already followed the steps in https://github.com/opf/openproject/blob/stable/7/docs/operations/upgrading/upgrading-postgresql.md  to upgrade the postgresql to 9.6 and finished the work successfully.


Replies (1)

RE: Upgrade from 6.1 to 7.4.7 fail with db migration error - Added by Oliver Günther about 6 years ago

Hi,

OpenProject database migrations have been squashed with the release of 7.2. To upgrade from an older version, you will have to upgrade to OpenProject 7.1 first, and from there you can update to the newest OpenProject 8.X release. There should be an appropriate error message when you run into a partially upgraded system. We will:

  • look into why this wasn't reported properly
  • correct the upgrade guides with a section for older OpenProject versions

Best,

Oliver

  • (1 - 1/1)
Loading...