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. OpenProject fresh installation on Ubuntu 20.04 database migration problem

OpenProject fresh installation on Ubuntu 20.04 database migration problem

Added by Da Maex over 4 years ago

Hello,

I followed the installation instructions on: https://docs.openproject.org/installation-and-operations/installation/packaged/#ubuntu-2004 and got to the point where the database creation and migration happens, but it bugs out on the migration.

I already removed the openproject database form postgresql and tried to configure again, same outcome. Problem seems to be table field relation:

I, [2020-11-12T10:49:25.902260 #13421]  INFO -- : Migrating to GenerateWpClosure (20170829095701)
== 20170829095701 GenerateWpClosure: migrating ================================
-- change_table(:relations, {})
E, [2020-11-12T10:49:28.080303 #13421] ERROR -- : Failed to process log message "Encountered slow SQL (2090.5882 ms): ALTER TABLE \"relations\" ADD \"hierarchy\" integer DEFAULT 0 NOT NULL": #<ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "rates" does not exist
LINE 8:  WHERE a.attrelid = '"rates"'::regclass

I also tried to continue the process with: sudo openproject run bundle exec rake db:migrate, same problem.

Hope you can help me, with best regards

wetaPIX


Replies (2)

RE: OpenProject fresh installation on Ubuntu 20.04 database migration problem - Added by Da Maex over 4 years ago

Well, to get different log output to upload here, i ran `sudo openproject run bundle exec rake db:migrate` like 4 to 5 times and finally it worked out.

Can't tell you what happened there. But on the last attempt the first thing in the migration is:

I, [2020-11-12T11:03:30.675382 #15821]  INFO -- : Migrating to GenerateWpClosure (20170829095701)
== 20170829095701 GenerateWpClosure: migrating ================================
-- change_table(:relations, {})
   -> 8.4843s
-- remove_column(:relations, :relation_type)
   -> 0.0006s
-- remove_column(:work_packages, :parent_id)
   -> 0.0004s
-- remove_column(:work_packages, :root_id)
   -> 0.0003s
-- remove_column(:work_packages, :lft)
   -> 0.0003s
-- remove_column(:work_packages, :rgt)
   -> 0.0003s
== 20170829095701 GenerateWpClosure: migrated (8.4888s) =======================

RE: OpenProject fresh installation on Ubuntu 20.04 database migration problem - Added by Max Mutzge over 4 years ago

Hi Da Maex, sounds like this issue is solved? Otherwise you could take a look at this video explaining the installation: https://www.youtube.com/watch?v=MTHZVQ_89-k

Kind regards

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