Defect #19905
closedProblem in migrate from 2.3 to 3.0.3
0%
Description
I installed redmine 3.0.3 and it got well (of course ).
then i dump the database in 2.3 and start upgrade. following upgrade guide.
at the step of migrate the database
bundle exec rake db:migrate RAILS_ENV=production --trace
an error occured
```
$ bundle exec rake db:migrate RAILS_ENV=production --trace- Invoke db:migrate (first_time)
- Invoke environment (first_time)
- Execute environment
- Invoke db:load_config (first_time)
- Execute db:load_config
- Execute db:migrate
20130602092539 CreateQueriesRoles: migrating =============================
-- create_table(:queries_roles, {:id=>false})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Table 'queries_roles' already exists: CREATE TABLE `queries_roles` (`query_id` int(11) NOT NULL, `role_id` int(11) NOT NULL) ENGINE=InnoDB/home/yuzhi.hyz/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query'
/home/yuzhi.hyz/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute'
/home/yuzhi.hyz/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `block in log'
/home/yuzhi.hyz/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/yuzhi.hyz/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `log'
/home/yuzhi.hyz/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute'
...
```
i don't know why and what to do next
If i ignore the error msg and continue the upgrade steps , run the server
the production log
```
$ cat production.log
Started GET "/" for 127.0.0.1 at 2015-05-21 16:55:21 +0800
Processing by WelcomeController#home as HTML
Current user: anonymous
Completed 500 Internal Server Error in 94ms
NoMethodError (undefined method `passwd_changed_on' for #<AnonymousUser:0x00000005f09e48>):
app/controllers/application_controller.rb:150:in `force_logout_if_password_changed'
```
what should i do to solve the problem?
Related issues
Updated by Toshi MARUYAMA over 9 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
Duplicate of #19905.
Updated by Toshi MARUYAMA over 9 years ago
- Resolution deleted (
Duplicate)
Updated by Toshi MARUYAMA over 9 years ago
- Related to Defect #15564: MySQL Errors updating from 2.3.2 to 2.4.1 added