Project

General

Profile

upgrade from 0.5.1 to 0.6.4 (err me too)

Added by Jeff Boehmer about 16 years ago

Hello,

I am trying to migrate a windows 2003 version of redmine/mysql to Ubuntu Hardy.
Everything goes well except when I try to do a restore database from my windows2003 - 0.5.1 version to the latest 0.6.4 version I get lots of field not found errors.
When I try to do the 'rake db:migrate RAILS_ENV="production"' command it errors at or after step 67 with

"Mysql::Error: Table 'wiki_redirects' already exists: CREATE TABLE `wiki_redirects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `wiki_id` int(11) NOT NULL, `title` varchar(255) DEFAULT NULL, `redirects_to` varchar(255) DEFAULT NULL, `created_on` datetime NOT NULL) ENGINE=InnoDB"

Any suggestions?

Is there a straight Mysql script I can run and edit if necessary to update the old schema?

jeff


Replies (3)

RE: upgrade from 0.5.1 to 0.6.4 (err me too) - Added by Thomas Lecavelier about 16 years ago

Just to be sure: you run the sb:migrate command after having importing your backup, right?

See the guide for upgrdaing

RE: upgrade from 0.5.1 to 0.6.4 (err me too) - Added by Jeff Boehmer about 16 years ago

I am assuming that you meant 'rake db:migrate RAILS_ENV="production" not 'sb:migrate'.

Yes, I did that and that is where I got this error -

"Mysql::Error: Table 'wiki_redirects' already exists: CREATE TABLE `wiki_redirects` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `wiki_id` int(11) NOT NULL, `title` varchar(255) DEFAULT NULL, `redirects_to` varchar(255) DEFAULT NULL, `created_on` datetime NOT NULL) ENGINE=InnoDB"

I have since dumped both my old database and the new install Mysql Databases to sql files. I went through the DDL line by line and created a Mysql script to migrate the 0.5.1 schema to the 0.6.4 schema. I had to truncate a few tables and reload data from the 0.6.4 dump to get the roles to work.

I am not sure I have gotten all the functionality back since the Redmine layout has changed so much.

Still investigating but if you determine if the db:migrate may have duplicate CREATE TABLE 'wiki_redirects' or steer me to the location of the database migrate scripts I would appreciate it.

Here is the mysql script I ran.

RE: upgrade from 0.5.1 to 0.6.4 (err me too) - Added by Jeff Boehmer about 16 years ago

Well, everything seems to be working now. I had to hand jam the associative records for projects_trackers but after that it all flew fine.

here is a site which when used with the standard Redmine install docs set me right up.
[[
http://www.drinkingbird.net/blog/articles/2008/02/27/setting-up-a-redmine-site-on-ubuntu]]

Jeff

    (1-3/3)