Upgrade from 0.8-stable to 0.9-stable
Added by storm scratcher over 14 years ago
Hi ;)
I try to upgrade my redmine install with 0.9-stable SVN repository
When i launch "rake db:migrate RAILS_ENV="production" --trace" command, i have this error of duplicate column name :
rake db:migrate RAILS_ENV="production" --trace (in /home/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == AddQueriesGroupBy: migrating ============================================== -- add_column(:queries, :group_by, :string) rake aborted! An error has occurred, all later migrations canceled: Mysql::Error: Duplicate column name 'group_by': ALTER TABLE `queries` ADD `group_by` varchar(255) /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/schema_statements.rb:195:in `add_column' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:352:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:352:in `method_missing' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:328:in `say_with_time' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:328:in `say_with_time' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:348:in `method_missing' ./db/migrate//20090425161243_add_queries_group_by.rb:3:in `up_without_benchmarks' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:282:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:282:in `migrate' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:282:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:365:in `__send__' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:365:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:486:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:562:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:562:in `ddl_transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:485:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in `up' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in `migrate' /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597: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.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19
How can i do to solve this problem ?
Thanks for your help
Replies (2)
RE: Upgrade from 0.8-stable to 0.9-stable
-
Added by Семен Михеев over 14 years ago
update issues_group plugin to 1.0.7
In command line retry:
rake db:migrate RAILS_ENV=production
If error retry then
In MySQL client drop two columns:
ALTER TABLE queries DROP category;
ALTER TABLE queries DROP group_by;
In command line retry:
rake db:migrate RAILS_ENV=production
RE: Upgrade from 0.8-stable to 0.9-stable
-
Added by Семен Михеев over 14 years ago
sorry last version issues_group 0.1.7 :)
http://www.redmine.org/attachments/2967/redmine_issues_group_0_1_7.zip