Project

General

Profile

Cleaning an hanging db:migration

Added by Valerio Bonfatti over 14 years ago

Hi all,
I've changed a plugin name after doing db:migrate_plugins (was not the expected name).
Now everytime I execute db:migrate_plugins i get an error, of course.
How can i clean the error?!


Replies (2)

RE: Cleaning an hanging db:migration - Added by Felix Schäfer over 14 years ago

Mmh, tough one. 1. please paste the old name, new name and full error here (maybe add --trace to the migration task to get full information), and 2. try contacting edavis10 on IRC, his knowledge of plugins should get you out of there in a jiffy :-)

RE: Cleaning an hanging db:migration - Added by Valerio Bonfatti over 14 years ago

I will try contact edavis10!!

In any case:
- Old Name: redmine-status-updates
- New NAme: redmine_status
- Trace:
C:\redmine-0.9.3>rake db:migrate_plugins --trace
(in C:/redmine-0.9.3)
  • Invoke db:migrate_plugins (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute db:migrate_plugins
    Migrating engines...
    Migrating acts_as_activity_provider...
    Migrating acts_as_attachable...
    Migrating acts_as_customizable...
    Migrating acts_as_event...
    Migrating acts_as_list...
    Migrating acts_as_searchable...
    Migrating acts_as_tree...
    Migrating acts_as_versioned...
    Migrating acts_as_watchable...
    Migrating awesome_nested_set...
    Migrating classic_pagination...
    Migrating coderay-0.7.6.227...
    Migrating global_filter_redmine_plugin...
    Migrating gravatar...
    Migrating open_id_authentication...
    Migrating prepend_engine_views...
    Migrating question_plugin...
    Migrating redmine-bulk_time_entry_plugin...
    Migrating redmine_bugcloud...
    Migrating redmine_checkout...
    Migrating redmine_collapse...
    Migrating redmine_issue_control_panel...
    Migrating redmine_issue_due_date...
    Migrating redmine_issues_group...
    Migrating redmine_show_descriptions...
    Migrating redmine_status...
    CreateStatuses: migrating ===============================================
    -- create_table(:statuses)
    rake aborted!
    An error has occurred, all later migrations canceled:

Mysql::Error: Table 'statuses' already exists: CREATE TABLE `statuses` (`id` int
(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `project_id` in
t(11), `message` varchar(255), `created_at` datetime, `updated_at` datetime) ENG
INE=InnoDB
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract_adapter.rb:219:in `log'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:323:in `execute'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/connection_adapters
/abstract/schema_statements.rb:114:in `create_table'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/connection_adapters
/mysql_adapter.rb:476:in `create_table'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:352:in
`send'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:352:in
`method_missing'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:328:in
`say_with_time'
C:/Ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:328:in
`say_with_time'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:348:in
`method_missing'
C:/redmine-0.9.3/vendor/plugins/redmine_status/db/migrate/001_create_statuses.rb
:3:in `up_without_benchmarks'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:282:in
`send'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:282:in
`migrate'
C:/Ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:282:in
`migrate'
C:1:in `__send__'
C:1:in `migrate'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:486
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:562:in
`call'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:562:in
`ddl_transaction'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:485:in
`migrate'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:472:in
`each'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:472:in
`migrate'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:400:in
`up'
C:/redmine-0.9.3/vendor/rails/activerecord/lib/active_record/migration.rb:383:in
`migrate'
C:/redmine-0.9.3/vendor/plugins/engines/lib/engines/plugin/migrator.rb:20:in `mi
grate_plugin'
C:/redmine-0.9.3/config/../vendor/plugins/engines/lib/engines/plugin.rb:93:in `m
igrate'
C:/redmine-0.9.3/lib/tasks/migrate_plugins.rake:8
C:/redmine-0.9.3/lib/tasks/migrate_plugins.rake:5:in `each'
C:/redmine-0.9.3/lib/tasks/migrate_plugins.rake:5
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_c
hain'
C:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_c
hain'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exceptio
n_handling'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exceptio
n_handling'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Ruby/bin/rake:19:in `load'
C:/Ruby/bin/rake:19

    (1-2/2)