Problem migrating database
Added by Peter Fastré over 15 years ago
I tried upgrading from my svn version to an uptodate version.
Old version:
Redmine revision: 2213
rails was 2.1.2 in this version
New version:
Redmine revision: 2675
ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux]
actionmailer (2.2.2, 2.1.2)
actionpack (2.2.2, 2.1.2)
activerecord (2.2.2, 2.1.2)
activeresource (2.2.2, 2.1.2)
activesupport (2.2.2, 2.1.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.7)
rails (2.2.2, 2.1.2)
rake (0.8.4)
But when executing the db:migrate, I get the following error:
rake db:migrate RAILS_ENV="production" --trace (in /var/www/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == BuildProjectsTree: migrating ============================================== rake aborted! An error has occurred, all later migrations canceled: Validation failed: Identifier has already been taken /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/validations.rb:1021:in `save_without_dirty!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/dirty.rb:87:in `save_without_transactions!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:150:in `save!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:138:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:150:in `save!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:158:in `rollback_active_record_state!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:150:in `save!' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:186:in `rebuild!' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:183:in `call' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:183:in `rebuild!' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:183:in `each' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:183:in `rebuild!' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:193:in `call' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:193:in `rebuild!' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:190:in `each' /var/www/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:190:in `rebuild!' ./db/migrate//105_build_projects_tree.rb:3:in `up_without_benchmarks' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate' (__DELEGATION__):2:in `__send__' (__DELEGATION__):2:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:111 /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19
As everything worked perfectedly using the old version, I'm now going back to this version. Any thoughts about what's going wrong in the update are greatly appreciated! Thanks in advance,
Peter
Replies (2)
RE: Problem migrating database
-
Added by satoshi furuichi about 15 years ago
I have a similar problem.
From: Redmine 0.8.4(stable)
To: Redmine 0.9(trunk)
105_build_projects_tree.rb
There have been problems in the project hierarchy process.
We are currently investigating.
Validation failed: translation missing: en, field_wiki is invalid /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/validations.rb:1021:in `save_without_dirty!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/dirty.rb:87:in `save_without_transactions!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:150:in `save!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in `transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:138:in `transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:150:in `save!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:158:in `rollback_active_record_state!' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:150:in `save!' /usr/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:186:in `rebuild!' /usr/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:193:in `call' /usr/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:193:in `rebuild!' /usr/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:190:in `each' /usr/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:190:in `rebuild!' ./db/migrate//105_build_projects_tree.rb:3:in `up_without_benchmarks' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `send' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:280:in `migrate' (__DELEGATION__):2:in `__send__' (__DELEGATION__):2:in `migrate' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:480:in `migrate' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `call' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:556:in `ddl_transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate' /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:111 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/local/bin/rake:19:in `load' /usr/local/bin/rake:19