member_roles' doesn't exist error while upgrading from redmine-0.8.0 to 1.1.1
Added by Rene Salmon almost 14 years ago
Hi,
Just upgraded our redmine from 0.8.0 to 1.1.1 following the upgrade procedure on the redmine site. after the upgrade I get this error message:
ActiveRecord::StatementInvalid (Mysql::Error: Table 'redminetest.member_roles' doesn't exist: SELECT count(DI
STINCT `members`.id) AS count_all FROM `members` LEFT OUTER JOIN `projects` ON `projects`.id = `members`.pro
ject_id LEFT OUTER JOIN `member_roles` ON (`members`.`id` = `member_roles`.`member_id`) LEFT OUTER JOIN `ro
les` ON (`roles`.`id` = `member_roles`.`role_id`) WHERE (`members`.user_id = 2 AND (projects.status=1)) ):
app/models/project.rb:130:in `visible_by'
app/models/project.rb:118:in `latest'
app/controllers/welcome_controller.rb:23:in `index'
I looked at the database tables in mysql and don't see a table "member_roles" I do see two separate tables "members" and "roles". Any ideas on how to fix this?
Thanks
Rene
Replies (5)
RE: member_roles' doesn't exist error while upgrading from redmine-0.8.0 to 1.1.1 - Added by Felix Schäfer almost 14 years ago
Did the migrations run correctly during the upgrade process?
RE: member_roles' doesn't exist error while upgrading from redmine-0.8.0 to 1.1.1 - Added by Rene Salmon almost 14 years ago
As far as I can tell everything ran just fine. I followed the upgrade procedure exactly as described on the webpage and all the migration commands returned with out any error messages sent to my terminal. Is there maybe a log file or somewhere else I should be checking for error messages?
One thing I should mention is that I have two versions of rack:
rack (1.1.0, 1.0.1)
The website clearly states that:
•Rack 1.0.1 is required. If you don't have this exact version, database migration would fail.
I am not sure which version redmine would pick for the migration but as I said before no failure messages where printed.
Thanks
Rene
RE: member_roles' doesn't exist error while upgrading from redmine-0.8.0 to 1.1.1 - Added by Rene Salmon almost 14 years ago
Just a bit more info on this problem hoping someone can point me in the right direction. Here is the full trace log from WEBrick.
Thanks
Rene
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:608:in `select'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/calculations.rb:237:in `execute_simple_calculation'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/calculations.rb:134:in `calculate'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/calculations.rb:130:in `catch'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/calculations.rb:130:in `calculate'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/calculations.rb:48:in `count'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:36:in `count_records'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:276:in `size'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:295:in `empty?'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:302:in `any?'
/usr/local/opt/redmine/test/redmine-1.1.1/app/models/project.rb:130:in `visible_by'
/usr/local/opt/redmine/test/redmine-1.1.1/app/models/project.rb:118:in `latest'
/usr/local/opt/redmine/test/redmine-1.1.1/app/controllers/welcome_controller.rb:23:in `index'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `send'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `run_before_filters'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:189:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:189:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:635:in `run_before_filters'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:615:in `call_filters'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:10:in `realtime'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/flash.rb:146:in `perform_action'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `send'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `process_without_filters'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/base.rb:391:in `process'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/base.rb:386:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in `dispatch'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/railties/lib/rails/rack/static.rb:31:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in `run'
/usr/local/opt/redmine/test/redmine-1.1.1/vendor/rails/railties/lib/commands/server.rb:111
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/opt/ruby-1.8.6-p287/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
RE: member_roles' doesn't exist error while upgrading from redmine-0.8.0 to 1.1.1 - Added by Rene Salmon almost 14 years ago
gem list
- LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
fastthread (1.0.1)
gruff (0.3.4)
i18n (0.4.2)
mysql (2.8.1)
rack (1.1.0, 1.0.1)
rails (2.3.8)
rake (0.8.7)
RE: member_roles' doesn't exist error while upgrading from redmine-0.8.0 to 1.1.1 - Added by Etienne Massip almost 14 years ago
You should definitely re-run db:migrate which should gives you errors.