Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • 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
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional 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?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Hierarchy leafWiki
You are here:
  • Support
  • Download and Installation
  • Migration paths
  • Migration 15 to 30

Content

Migration 15 to 30

  • More
    • Print
    • Table of contents

Migration from Chiliproject 1.5.2 to OpenProject 3.0

This page describes the migration process all the way from chiliproject 1.5.2 up to openproject 3.0 for the fit configuration (a.k.a cockpit).
While based on that configuration all these steps as well as the referred repositories can be used as a starting point for migrations of arbitrary configurations.

  • 1Migration from Chiliproject 1.5.2 to OpenProject 3.0
  • 2Migration from chiliproject 1.5.2 to 2.4
    • 2.1Migration settings
    • 2.2Steps
      • 2.2.1Checkout
      • 2.2.2RVM setup
      • 2.2.3Install Gems
      • 2.2.4Database Setup
      • 2.2.5Generate Session Store
      • 2.2.6Database Migrations
    • 2.3Changes to ActiveRecord
  • 3Migration from 2.4 to 3.0
    • 3.1Documents
    • 3.2Steps
      • 3.2.1Checkout
      • 3.2.2RVM setup
      • 3.2.3Install Gems
      • 3.2.4Database Setup
      • 3.2.5Generate Secret Token
      • 3.2.6Database Migrations
        • 3.2.6.1Error: There are still attachments attached to Versions or Projects!
        • 3.2.6.2Mysql2::Error: Illegal mix of collations

Migration from chiliproject 1.5.2 to 2.4

Migrating to chiliproject @tag 2.4.0.

Migration settings

redmine_backlogs is now chiliproject_backlogs. Accordingly the settings plugin_redmine_backlogs has to be changed to plugin_chiliproject_backlogs.

This has been implemented in a rails migration in the repository referred to below.

Steps

Checkout

git clone -b migrate/1.5_to_2.4 https://dev.finn.de/git/redmine-config-fit migrate-1.5_to_2.4

RVM setup

Use ruby 1.8.7, e.g.:

cd migrate-1.5_to_2.4
echo 1.8.7 > .ruby-version && echo migrate-1.5_to_2.4 > .ruby-gemset
cd . # to apply

You can also put those files directly into the chiliproject directory, that’s up to you, really.

Install Gems

In the chiliproject directory do:

bundle install

Database Setup

This guide assumes that you have an existing production database which you want to migrate.
Accordingly you do the following in the checked out directory:

cd chiliproject
cp config/database.yml.example config/database.yml

Then fill in said database under production.

Generate Session Store

RAILS_ENV=production bundle exec rake generate_session_store

Database Migrations

RAILS_ENV=production bundle exec rake db:migrate:all

This step may take a while depending on the existing data.

After this step you are done with the migration from chiliproject 1.5 to openproject 2.4.

Changes to ActiveRecord

Some migration may not work due to it using an unsafe feature.

If this happens, comment to disable:

/.rvm/gems/ruby-1.8.7-p374@mygemset/gems/activerecord-2.3.18/lib/active_record/attribute_methods.rb:195

that is the following code:

raise ActiveRecordError, "You tried to assign already serialized content to #{attr_name}. This is disabled due to security issues."

Migration from 2.4 to 3.0

Documents

Install plug-in ‘openproject-documents’ by adding the following to Gemfile.plugins:

gem “openproject-documents”, :git => “git@github.com:finnlabs/openproject-documents.git”, :branch => “dev”

This has been done in the configuration referred to below.
Through this all documents except for Project and Version attachments are kept.
Project and Version attachments have to be deleted during migration.
An according notification with further instructions will come up as you execute it.

Steps

Checkout

git clone-b migrate/2.4_to_3.0 https://dev.finn.de/git/redmine-config-fit migrate-2.4_to_3.0

RVM setup

Use ruby 2.0, e.g.:

cd migrate-2.4_to_3.0
echo 2.0 > .ruby-version && echo migrate-2.4_to_3.0 > .ruby-gemset
cd . # to apply

You can also put those files directly into the chiliproject directory, that’s up to you, really.

Install Gems

In the openproject directory do:

bundle install

Database Setup

This guide assumes that you have an existing production database which you want to migrate.
Accordingly you do the following in the checked out directory:

cd openproject
cp config/database.yml.example config/database.yml

Then fill in said database (the same used above in the section for migrating from 1.5 to 2.4) under production.

Generate Secret Token

RAILS_ENV=production bundle exec rake generate_secret_token

Database Migrations

In the checked out directory run:

RAILS_ENV=production FROM="Europe/Berlin" rake migrations:timelines:reregister migrations:strong_passwords:reregister db:migrate

Replace the value for FROM with the correct locale. That is the locale under which the data that is being migrated was saved.
This migration may take a considerable amount of time depending on your existing data which is being migrated.

Error: There are still attachments attached to Versions or Projects!

Support for Project and Version attachments has been dropped in OpenProject 3.0.
Hence the only solution is to delete those attachments altogether:

RAILS_ENV=production rake migrations:attachments:delete_from_projects_and_versions

If you still need them, you might migrate them by creating a documents (requires the documents plugin) for them.
E.g. create one document for each project/version and then in the attachments table change container_type to 'document' and the container_id to the id of the respective document. All this is best done in a separate migration which you would create.

After this you rerun the migration.

Mysql2::Error: Illegal mix of collations

Continue the migrations after:

RAILS_ENV=production rake migrations:journals:fix_table_collation

This may occur when you forgot to specify a collation in database.yml:

production:
  adapter: mysql2
  database: my_database
  host: localhost
  username: my_user
  password: my_password
  encoding: utf8
  collation: utf8_general_ci

So to avoid this problem to begin with use whatever collation is used in the existing production data under collation.
When migrating from an older rails version it likely is 'utf8_general_ci' whereas in newer versions it usually is 'utf8_unicode_ci' which is what leads to this error eventually.
Alternatively you can just update the existing tables to whatever collation you prefer while also specifying it in database.yml before running any migrations.

Loading...