Defect #5092
closedError in upgrading from 0.8.7 to 0.9.3 : "column members.role_id does not exist"
0%
Description
When upgrading from 0.8.7 to 0.9.3 I followed the steps decsribed in http://www.redmine.org/wiki/redmine/RedmineUpgrade
I had some problems with "rake db:migrate RAILS_ENV=production" and "rake db:migrate_plugins RAILS_ENV=production" due to old plugins and pg missing gem.
I then removed my 0.8.7 plugins and just let the embedded plugins with 0.9.3, and the update passed.
When I restarted Apache (I use passenger) and tried to connect to redmine, I had the internal error page. Everything was ok in the apache and redmine logs.
The only problems is in postgres logs, where I have this error everytime I try to access a redmine page:
"ERROR: column members.role_id does not exist"
Looks like the database is not updated.
My config :
Postgres 8.1
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]
gem 1.3.6
- LOCAL GEMS ***
actionmailer (2.3.5, 2.3.2)
actionpack (2.3.5, 2.3.2)
activerecord (2.3.5, 2.3.2)
activeresource (2.3.5, 2.3.2)
activesupport (2.3.5, 2.3.2)
fastthread (1.0.7)
googlecharts (1.5.3)
passenger (2.2.11, 2.2.8)
pg (0.9.0)
rack (1.1.0, 1.0.1)
rails (2.3.5, 2.3.2)
rake (0.8.7, 0.8.3)
ruby-postgres (0.7.1.2006.04.06)
rubygems-update (1.3.6)
Updated by Jean Maynier almost 15 years ago
Apparently the database is updated, because role_id exist before the upgrade and not after.
I reverse to the 0.8.7 with a saved dump of the database.
My members table is as follow, with a role_id column :
redmine=> select * from members;
id | user_id | project_id | role_id | created_on | mail_notification
----+---------+------------+---------+----------------------------+-------------------
1 | 3 | 2 | 3 | 2009-12-11 10:06:55.901907 | f
4 | 5 | 6 | 4 | 2010-01-25 12:02:33.879041 | f
After upgrade :
redmine=# select * from members;
id | user_id | project_id | created_on | mail_notification
----+---------+------------+----------------------------+-------------------
1 | 3 | 2 | 2009-12-11 10:06:55.901907 | f
4 | 5 | 6 | 2010-01-25 12:02:33.879041 | f
Could it be a column created by a plugin (but if I stard with only the embedded plugin this column should not be used) ?
Updated by Jean-Philippe Lang almost 15 years ago
- Status changed from New to Closed
- Resolution set to Invalid
I see 2 possible reasons why you got this error:
- you didn't restart the app after upgrading the database
- you were using a plugin that relies on this column
Take your 0.8.7 database backup. Install a fresh 0.9.3 Redmine code, upgrade your database and it should work.
Then try to add your plugins one by one.