Project

General

Profile

Problems to migrate the database from redmine 0.9.2 to 1.0.1

Added by Anonymous about 14 years ago

Hi,

I'm trying to upgrade my redmine from 0.9.2 to 1.0.1, but i have problems with the database migration, on the table issues, the error is that the column parent_id already exist, i'm new using redmine so i'll apreciate any help.

thanks in advance...


Replies (8)

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Felix Schäfer about 14 years ago

Do you have or had you the subissues plugin installed?

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Anonymous about 14 years ago

no, but in the version 0.9 i was using this plugin, because of that parent_id is already in the database, and i can't finish de migration, when run te application there is an error in custom fields:

ActiveRecord::SubclassNotFound in Custom fieldsController#index

The single-table inheritance mechanism failed to locate the subclass: 'DocumentCustomField'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite CustomField.inheritance_column to use another column for that information.

thanks in advance...

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Felix Schäfer about 14 years ago

See #6035 for help migrating from the subissues plugin, it is not supported anymore, nor has the author of the plugin provided a meaningful upgrade path. If you don't mind loosing your current issue nesting, just deleting from the table issues the columns parent_id, root_id, lft, rgt and then upgrading might also work.

The cleanest solution either way would be to roll back the DB as it was before you upgraded and then try any of these solutions.

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Anonymous about 14 years ago

I already had success to upgrade the database using the patch of the subtask, but the problem with the custom fields is still there.

Thank you very much for the answers

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Felix Schäfer about 14 years ago

Well, that sounds like an incomplete update, either some files weren't updated properly, or your db migration didn't go through cleanly. Another culprit could be a plugin if it's not compatible with 1.0.

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Anonymous about 14 years ago

the custom field error:
What I'm doing is restoring a backup of the database of the version 0.9.2 and then, i make the steps of the migration, it is that ok? I'll appreciate any sugestion.

thanks in advance

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Felix Schäfer about 14 years ago

Yes, loading a dump of the "old" DB into the new database server into an empty DB, pointing redmine to that DB and running rake db:migrate (or RAILS_ENV=production rake db:migrate if it is your production DB) is the right way to go. If the db:migrate goes through cleanly, you have another error somewhere.

RE: Problems to migrate the database from redmine 0.9.2 to 1.0.1 - Added by Anonymous about 14 years ago

Thanks a lot for the answers, I'll try to find the cause of the error.

    (1-8/8)