Content
Upgrading openproject 3.0.1
Added by Tiago Geada over 8 years ago
Hello,
In the past I’ve installed OpenProject 2.something and at the time, even got support here on how to upgrade it to 3.0.1
Meanwhile few years passed and now we noticed that we’re missing out on features.
We only have a production environment, and although I can deal at ease with linux stuff, I’m really clueless about ruby, gems, rake, etc etc. I do remember going trough a hassle last time during installation and upgrade, and sure will go trough it again, but an’t remember anything really.
Now at the time this was installed manually, but we’re using debian and noticed that you have a debian repo with pre built packages.
What is the best (and easy?) way to upgrade?
I was thinking I could just apt-get install it, replicate the database and see how it works but I’m a bit afraid.
Do I need to upgrade to every version until I come to the last one?
Help needed!
Thanks in advance
Replies (4)
Hey Tiago,
the upgrade of OpenProject itself should be really simple (since database migrations from there are linear), but as you mentioned, its dependencies are growing (gem, bundler, npm & bower since recent versions).
I strongly suggest you to try and migrate to a packaged installation.
To provide some more insights, I’d need to know more about your current installation?
Best,
Oliver
Hi Oliver,
Thank you for your reply.
I’m using Debian Jessie
Apache with mod passenger
ruby (with ruby-passenger)
I guess I can just use apt-get and install openproject (tho haven’t tried it yet), but I’m worried about the old database..
So, once I install the package how do I migrate the DB from such a old version? Any hints?
Hi,
So I tried to copy our current database to a new one, and in the ‘openproject configure’ wizard, I used the option ‘reuse’ mysql db.
Here is the full log
[repositories] ./bin/postinstall
Setting up Git integration for Apache
[smtp] ./bin/postinstall
[memcached] ./bin/postinstall
[openproject] ./bin/postinstall
20100528100562 AggregatedGlobalRolesMigrations: migrating
— add_column(:roles, :type, :string, {:limit=>30, :default=>“Role”})
-> 0.1443s
— create_table(:principal_roles)
-> 0.0412s
— add_index(:principal_roles, :role_id)
-> 0.0754s
— add_index(:principal_roles, :principal_id)
-> 0.0749s
20100528100562 AggregatedGlobalRolesMigrations: migrated (0.3622s) ===
20110215143061 AggregatedReportingMigrations: migrating
-- create_table("cost_queries")
-> 0.0482s
-- add_timestamps(:custom_fields)
-> 0.2920s
20110215143061 AggregatedReportingMigrations: migrated (0.3413s) ===
20111014073606 AggregatedBacklogsMigrations: migrating =
-- create_table("version_settings")
-> 0.0384s
-- add_index("version_settings", ["project_id", "version_id"], {:name=>"index_version_settings_on_project_id_and_version_id"})
-> 0.0753s
-- create_table("issue_done_statuses_for_project", {:id=>false})
-> 0.0412s
20111014073606 AggregatedBacklogsMigrations: migrated (0.1897s)
20120605121861 AggregatedMyProjectPageMigrations: migrating
-- create_table(:my_projects_overviews)
-> 0.0399s
20120605121861 AggregatedMyProjectPageMigrations: migrated (1.0327s) ===
20121114100641 AggregatedAnnouncementsMigrations: migrating
-- create_table(:announcements)
-> 0.0483s
-- add_index(:announcements, [:show_until, :active])
-> 0.0837s
20121114100641 AggregatedAnnouncementsMigrations: migrated (0.1330s) ===
20130612104243 ReportingMigrateSerializedYaml: migrating =
20130612104243 ReportingMigrateSerializedYaml: migrated (0.0006s)
20130625094113 AddBacklogsColumnToWorkPackage: migrating =
— add_column(:work_packages, :position, :integer)
-> 0.2665s
— add_column(:work_packages, :story_points, :integer)
-> 0.2834s
— add_column(:work_packages, :remaining_hours, :float)
-> 0.4834s
20130625094113 AddBacklogsColumnToWorkPackage: migrated (1.0340s)
20130807083716 ChangeAttachmentJournalsDescriptionLength: migrating
-- change_column(:attachment_journals, :description, :text)
-> 0.1499s
20130807083716 ChangeAttachmentJournalsDescriptionLength: migrated (0.1500s)
20130807085604 CreateDocumentJournals: migrating =
— create_table(:document_journals)
-> 0.0412s
20130807085604 CreateDocumentJournals: migrated (0.0413s)
20130814131242 CreateDocumentsTables: migrating
-- create_table("documents")
-> 0.0404s
-- add_index("documents", ["category_id"], {:name=>"index_documents_on_category_id"})
-> 0.0753s
-- add_index("documents", ["created_on"], {:name=>"index_documents_on_created_on"})
-> 0.1250s
-- add_index("documents", ["project_id"], {:name=>"documents_project_id"})
-> 0.0749s
20130814131242 CreateDocumentsTables: migrated (0.3168s) ===
20130903172842 MyProjectPageMigrateSerializedYaml: migrating =
20130903172842 MyProjectPageMigrateSerializedYaml: migrated (3.6168s)
20130904181242 RenameBlocksKeys: migrating =
20130904181242 RenameBlocksKeys: migrated (0.1617s)
20130916094370 LegacyIssuesBacklogsDataToWorkPackages: migrating =
20130916094370 LegacyIssuesBacklogsDataToWorkPackages: migrated (0.0032s)
20130919092624 AddBacklogColumnsToWorkPackageJournal: migrating
-- add_column(:work_package_journals, :story_points, :integer)
-> 0.5163s
-- add_column(:work_package_journals, :remaining_hours, :float)
-> 1.3084s
-- add_index(:work_package_journals, [:fixed_version_id, :status_id, :project_id, :type_id], {:name=>"work_package_journal_on_burndown_attributes"})
-> 0.1168s
20130919092624 AddBacklogColumnsToWorkPackageJournal: migrated (1.9422s) ===
20130925090243 CostReportsMigration: migrating =
20130925090243 CostReportsMigration: migrated (0.0040s)
20131001132542 RenameIssueStatusToStatus: migrating
-- rename_table(:issue_done_statuses_for_project, :done_statuses_for_project)
-> 0.0333s
-- rename_column(:done_statuses_for_project, :issue_status_id, :status_id)
-> 0.1592s
20131001132542 RenameIssueStatusToStatus: migrated (0.1927s) ===
20140113132617 CreateExportCardConfiguration: migrating
-- create_table(:export_card_configurations)
-> 0.0495s
20140113132617 CreateExportCardConfiguration: migrated (0.0496s) ===
20140129103924 AddActiveToExportCardConfigurations: migrating
— add_column(:export_card_configurations, :active, :boolean, {:default=>true})
-> 0.1414s
20140129103924 AddActiveToExportCardConfigurations: migrated (0.1415s) ===
20140207134248 AddDescriptionToExportCardConfigurations: migrating =
-- add_column(:export_card_configurations, :description, :text)
-> 0.1498s
20140207134248 AddDescriptionToExportCardConfigurations: migrated (0.1499s)
20140320140001 LegacyDocumentJournalData: migrating
20140320140001 LegacyDocumentJournalData: migrated (0.0020s) ===
20140429152018 AddSessionsTable: migrating =
-- create_table(:sessions)
-> 0.0495s
-- add_index(:sessions, :session_id)
-> 0.0837s
-- add_index(:sessions, :updated_at)
-> 0.0833s
20140429152018 AddSessionsTable: migrated (0.2168s)
20140430125956 ResetContentTypes: migrating ==
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
undefined method `to_file’ for nil:NilClass
/opt/openproject/app/uploaders/file_uploader.rb:35:in `local_file’
/opt/openproject/app/models/attachment.rb:149:in `diskfile’
/opt/openproject/db/migrate/20140430125956_reset_content_types.rb:32:in `block in up’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each’
/opt/openproject/db/migrate/20140430125956_reset_content_types.rb:31:in `up’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:611:in `exec_migration’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:592:in `block (2 levels) in migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:591:in `block in migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:590:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:768:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:1046:in `ddl_transaction’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:997:in `execute_migration_in_transaction’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:959:in `block in migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:955:in `each’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:955:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:823:in `up’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:801:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/tasks/database_tasks.rb:137:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>’
NoMethodError: undefined method `to_file’ for nil:NilClass
/opt/openproject/app/uploaders/file_uploader.rb:35:in `local_file’
/opt/openproject/app/models/attachment.rb:149:in `diskfile’
/opt/openproject/db/migrate/20140430125956_reset_content_types.rb:32:in `block in up’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each’
/opt/openproject/db/migrate/20140430125956_reset_content_types.rb:31:in `up’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:611:in `exec_migration’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:592:in `block (2 levels) in migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:591:in `block in migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:590:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:768:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:1046:in `ddl_transaction’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:997:in `execute_migration_in_transaction’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:959:in `block in migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:955:in `each’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:955:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:823:in `up’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/migration.rb:801:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/tasks/database_tasks.rb:137:in `migrate’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>’
Tasks: TOP => db:migrate
(See full trace by running task with —trace)
I also tried to run int manually with —trace, not sure I ran it the correct way:
root@webserver:/opt/openproject# /opt/openproject/vendor/bundle/ruby/2.1.0/gems/rake-11.2.2/exe/rake migrate —trace
rake aborted!
cannot load such file — bundler/setup
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/opt/openproject/config/boot.rb:32:in `<top (required)>’
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/opt/openproject/config/application.rb:30:in `<top (required)>’
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require’
/opt/openproject/Rakefile:33:in `<top (required)>’
/usr/lib/ruby/2.1.0/rake/rake_module.rb:25:in `load’
/usr/lib/ruby/2.1.0/rake/rake_module.rb:25:in `load_rakefile’
/usr/lib/ruby/2.1.0/rake/application.rb:637:in `raw_load_rakefile’
/usr/lib/ruby/2.1.0/rake/application.rb:94:in `block in load_rakefile’
/usr/lib/ruby/2.1.0/rake/application.rb:165:in `standard_exception_handling’
/usr/lib/ruby/2.1.0/rake/application.rb:93:in `load_rakefile’
/usr/lib/ruby/2.1.0/rake/application.rb:77:in `block in run’
/usr/lib/ruby/2.1.0/rake/application.rb:165:in `standard_exception_handling’
/usr/lib/ruby/2.1.0/rake/application.rb:75:in `run’
/opt/openproject/vendor/bundle/ruby/2.1.0/gems/rake-11.2.2/exe/rake:27:in `
’