Problem with migration from 1.0.0 to 2.2.3
Added by T K almost 12 years ago
When migrating Redmine from the old legacy server to the new machine I got following error:
me@my_machine:~/PROJECTS/redmine-2.2.3$ sudo RAILS_ENV=production rake db:migrate == AddUniqueIndexOnMembers: migrating ======================================== rake aborted! An error has occurred, all later migrations canceled: Mysql::Error: Table 'redmine.member_roles' doesn't exist: DELETE FROM `member_roles` WHERE (member_id NOT IN (SELECT id FROM members)) /home/me/PROJECTS/redmine-2.2.3/db/migrate/20101104182107_add_unique_index_on_members.rb:4:in `up' Tasks: TOP => db:migrate (See full trace by running task with --trace)
Indeed member_roles tables doesn't exist.
This is how my imported mysql DB looks like:
mysql> show tables; +------------------------+ | Tables_in_redmine | +------------------------+ | attachments | | auth_sources | | boards | | changes | | changesets | | changesets_issues | | comments | | custom_fields | | custom_fields_projects | | custom_fields_trackers | | custom_values | | documents | | enabled_modules | | enumerations | | issue_categories | | issue_relations | | issue_statuses | | issues | | journal_details | | journals | | members | | messages | | news | | plugin_schema_info | | projects | | projects_trackers | | queries | | repositories | | roles | | schema_info | | schema_migrations | | settings | | time_entries | | tokens | | trackers | | user_preferences | | users | | versions | | watchers | | wiki_content_versions | | wiki_contents | | wiki_pages | | wiki_redirects | | wikis | | workflows | +------------------------+ 45 rows in set (0.00 sec)
Any help would be appreciated ...
Replies (9)
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by Rick Veenstra almost 12 years ago
I still have a 0.9.4 database backup over here and when I look into it the "member_roles" tables doesn't exist yet (don't know about 1.0.0 though). So I think the warning / error is correct but the handling of it is not.
Did you try with an earlier version as well. I just migrated from 0.9.4 to 2.2.0 a month ago without any issues
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by T K almost 12 years ago
Thank you for a hint. I will try if import to 2.2.0 works correctly.
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by Rick Veenstra almost 12 years ago
Let me know how it works out with that version.
Beware though 2.2.0 contains two security issues. If your Redmine is accessable from the big-bad world that is Internet you should migrate to 2.2.1 if the first migration is succesfull
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by Jan Niggemann (redmine.org team member) almost 12 years ago
Rick Veenstra wrote:
Beware though 2.2.0 contains two security issues.
Not redmine itself, the versions of rails defined in Gemfile had.
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by Rick Veenstra almost 12 years ago
I'm sorry you're right!
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by T K almost 12 years ago
I tried import to version 2.2.0 but I still got the same error after rake db:migrate
:
Mysql::Error: Table 'redmine.member_roles' doesn't exist: DELETE FROM 'member_roles' WHERE (member_id NOT IN (SELECT id FROM members))
I had redmine 1.0.0 on Windows and migrate to redmine 2.2.3 on Ubuntu server.
Is it possible that the problem has something to do with operating system change ?
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by Jan Niggemann (redmine.org team member) almost 12 years ago
T K wrote:
Is it possible that the problem has something to do with operating system change ?
No, it must be something else...
Do you use the mysql2 adapter?
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by T K almost 12 years ago
I am using mysql adapter as my ruby version is 1.8.7.
RE: Problem with migration from 1.0.0 to 2.2.3 - Added by Jan Niggemann (redmine.org team member) almost 12 years ago
What happens if you just create the missing table?