Open link in a new tab

Content

Expand project menu

dbmigrate error when update from version 7.3.2

When I try to migrate my actual openproject bd (openproject 7.3.2 centos7) to the new version ( openproject 10.6.5 centos8) , I have this error 

command: sudo openproject run rake db:migrate 

"** Execute db:migrate

/opt/openproject/db/migrate/20180116065518_add_hierarchy_paths.rb:45:in `rescue in block (2 levels) in change': Failed to rebuild hierarchy paths. Call `Relation.rebuild_hierarchy_paths!` manually to correct this: undefined method `rebuild_hierarchy_paths!' for #<Class:0x0000562cf1b0a6e8> (StructuredWarnings::StandardWarning)

rake aborted!

StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedColumn: ERROR:  no existe la columna projects.project_type_id

LINE 1: ...ects"."lft" AS t1_r9, "projects"."rgt" AS t1_r10, "projects"...

"

In the original database (version 7.3.2) the column "projects.project_type_id" exists, however at this point of the migration, the column already don't exist.

I don't know how to continue with the migration .. ¿Any idea?

The error log is attached.

Thanks in advance.

Message actions

Hi ! Finally I could fix it. My workaround was simple:

  • Create the field "projects.project_type_id".
  • Launch another time the openProject configure command, really I think is enough with "openproject run rake db:migrate".
Message actions

Hi Francisco,

I'm glad you could fix this. Thank you for posting your workaround and helping other users by this!

Kind regards

Matthias