relaxdiego/redmine_backlogs — Issue #320: Crash on migration to latest version
Author: pauleil
Created: 2011-11-02 23:09:12+00:00
State: open

Previous version worked fine. Using RM 1.2.1 and Postgres.

The latest update, when I attempt migration, fails with:

# rake db:migrate_plugins RAILS_ENV=production --trace
(in /usr/local/www/redmine)
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead.
at /usr/local/www/redmine/lib/tasks/email.rake:170
** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate_plugins
Migrating redmine_backlogs...
== ReinstateRemaining: migrating =============================================
-- execute("select count(remaining_hours) from issues")
-- add_column(:issues, :remaining_hours, :float)
rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR: current transaction is aborted, commands ignored until end of transaction block
: ALTER TABLE "issues" ADD COLUMN "remaining_hours" float
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:520:in `execute'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:813:in `add_column'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:352:in `send'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:352:in `method_missing'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:328:in `say_with_time'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:328:in `say_with_time'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:348:in `method_missing'
/usr/local/www/redmine/vendor/plugins/redmine_backlogs/db/migrate/024_reinstate_remaining.rb:26:in `up_without_benchmarks'
/usr/local/www/redmine/vendor/plugins/redmine_backlogs/db/migrate/024_reinstate_remaining.rb:21:in `catch'
/usr/local/www/redmine/vendor/plugins/redmine_backlogs/db/migrate/024_reinstate_remaining.rb:21:in `up_without_benchmarks'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `send'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `migrate'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `migrate'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:365:in `__send__'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:365:in `migrate'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:491:in `migrate'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:565:in `call'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:565:in `ddl_transaction'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:565:in `ddl_transaction'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:490:in `migrate'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:477:in `each'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:477:in `migrate'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:401:in `up'
/usr/local/www/redmine/vendor/rails/activerecord/lib/active_record/migration.rb:383:in `migrate'
/usr/local/www/redmine/vendor/plugins/engines/lib/engines/plugin/migrator.rb:20:in `migrate_plugin'
/usr/local/www/redmine/config/../vendor/plugins/engines/lib/engines/plugin.rb:93:in `migrate'
/usr/local/www/redmine/lib/tasks/migrate_plugins.rake:8
/usr/local/www/redmine/lib/tasks/migrate_plugins.rake:5:in `each'
/usr/local/www/redmine/lib/tasks/migrate_plugins.rake:5
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158: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.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Tasks: TOP => db:migrate_plugins