Project

General

Profile

Migration redmine 0.9.3 to 1.3.2 error 500

Added by David Silva almost 11 years ago

Hi all,

We currently have redmine 0.9.3 under production and I created a new box with ubuntu 12.04 LTS and installed redmine using debian packages "redmine and redmine-mysql"

I have done the follow steps;
Mysqldump database from production,
Export files directory,
Add the files directory to the new installation,
And all works until this stage,
Then I imported the mysqldump,
under redmine directory i have done;
rake db:migrate RAILS_ENV=production && rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production && rake tmp:cache:clear && rake tmp:sessions:clear && service apache2 restart
Now I can logging with my user from production but when I go to "my page" it display's "Internal Error",
I cannot see any "issue",

Next I have compared the schema from the old, new databases and the upgraded schema and found that root_id, rgt and lft is missing on the table issues.

Can anyone give me hand with this I try all that I could find but no joy so far.

My system;
OS:
Linux devsupp 3.2.0-39-virtual #62-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
Server version: Apache/2.2.22 (Ubuntu)
Server built: Mar 8 2013 15:53:20
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.6, APR-Util 1.3.12
Compiled using: APR 1.4.6, APR-Util 1.3.12
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"

Redmine
ii redmine 1.3.2+dfsg1-1ubuntu1 flexible project management web application
ii redmine-mysql 1.3.2+dfsg1-1ubuntu1 metapackage providing MySQL dependencies for Redmine
gem 1.8.15
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Rails 2.3.14
rake, version 0.9.2.2

Ok, after playing with it I got it working properly!

Dump Database on old server
Import Database on new server
use redmine_default;
drop table changeset_parents;
on /var/redmine
sudo rake tmp:cache:clear && sudo rake tmp:sessions:clear && sudo rake db:migrate RAILS_ENV=production && sudo rake db:migrate:upgrade_plugin_migrations RAILS_ENV=production && sudo rake tmp:cache:clear && sudo rake tmp:sessions:clear && sudo service apache2 restart

(Table Workflow)
alter table workflows add assignee tinyint(1) DEFAULT '0' NOT NULL;
alter table workflows add author tinyint(1) DEFAULT '0' NOT NULL;

(Table Project)
alter table projects modify name varchar(255) NOT NULL DEFAULT '';
alter table projects modify identifier varchar(255);

Issues fix (Table Issues)
alter table issues add parent_id int(11) NULL DEFAULT 0;
alter table issues add root_id int(11) NULL;
alter table issues add lft int(11) NULL;
alter table issues add rgt int(11) NULL;
alter table issues add is_private tinyint(1) NOT NULL DEFAULT 0;
alter table issues add KEY `index_issues_on_root_id_and_lft_and_rgt` (`root_id`,`lft`,`rgt`);
update issues set root_id = id, lft = 1, rgt = 2 where root_id is NULL;

This line is for checking columns
select id,tracker_id,project_id,due_date,category_id,status_id,assigned_to_id,priority_id, author_id,done_ratio,parent_id,root_id,lft,rgt,is_private from issues where author_id like '22'; #this one is to test.

alter table changes modify path text NOT NULL;
alter table changes modify from_path text;
alter table custom_fields add `visible` tinyint(1) NOT NULL DEFAULT '1';
alter table journal_details modify old_value text;
alter table journal_details modify value text;
alter table repositories modify `password` varchar(255) DEFAULT '';
alter table repositories add `path_encoding` varchar(64) DEFAULT NULL;
alter table repositories add `log_encoding` varchar(64) DEFAULT NULL;
alter table repositories add `extra_info` text;
alter table users modify `mail_notification` varchar(255) NOT NULL DEFAULT '';
alter table users add `salt` varchar(64) DEFAULT NULL;
alter table auth_sources modify `account_password` varchar(255) DEFAULT '';
alter table issues modify `parent_id` int(11) DEFAULT NULL;
update issues set parent_id = NULL;

Users email fix
update users set mail_notification = "only_my_events";
select id,login,language,mail_notification from users;
update users set mail_notification = NULL where id = 2;
update users set mail_notification = NULL where id = 75;
update users set mail_notification = NULL where id = 99;
update users set language = "en-GB";
select id,login,language,mail_notification from users;

alter table roles add `issues_visibility` varchar(30) NOT NULL DEFAULT 'default';

Now on Web interface do the follow
update redmine -> administration -> general -> "Host name and path" # This will adjust the url send on email to the right.

Hope this helps anyone else with the same issue.

Cheers
David Silva.