I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #1785

Multiple migrate_plugins calls fails

Added by Pedro Algarvio almost 13 years ago. Updated almost 11 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
Target version:
-
Start date:
11 Jun 2011
Due date:
17 Jun 2011
% Done:

0%

Redmine version:
External issue:

Description

Multiple calls to rake db:migrate_plugins RAILS_ENV="production" fails, at least on a Postgres database.

# rake db:migrate_plugins RAILS_ENV="production" --trace
(in /usr/share/redmine)
** 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 google_analytics_plugin...
Migrating gravatar...
Migrating open_id_authentication...
Migrating prepend_engine_views...
Migrating recaptcha...
Migrating redmine-mylyn-connector...
Migrating redmine-openid-selector...
Migrating redmine_bots_filter...
Migrating rfpdf...
Migrating ruby-net-ldap-0.0.4...
Migrating sense...
==  CreateGoogleAds: migrating ================================================
-- create_table(:google_ads)
NOTICE:  CREATE TABLE will create implicit sequence "google_ads_id_seq1" for serial column "google_ads.id" 
rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR:  relation "google_ads" already exists
: CREATE TABLE "google_ads" ("id" serial primary key, "hook" character varying(255) NOT NULL, "html_code" text NOT NULL) 
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/usr/lib/ruby/1.8/active_record/connection_adapters/postgresql_adapter.rb:520:in `execute'
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/schema_statements.rb:109:in `create_table'
/usr/lib/ruby/1.8/active_record/migration.rb:352:in `send'
/usr/lib/ruby/1.8/active_record/migration.rb:352:in `method_missing'
/usr/lib/ruby/1.8/active_record/migration.rb:328:in `say_with_time'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/active_record/migration.rb:328:in `say_with_time'
/usr/lib/ruby/1.8/active_record/migration.rb:348:in `method_missing'
/usr/share/redmine/vendor/plugins/sense/db/migrate/001_create_google_ads.rb:4:in `up_without_benchmarks'
/usr/lib/ruby/1.8/active_record/migration.rb:282:in `send'
/usr/lib/ruby/1.8/active_record/migration.rb:282:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/active_record/migration.rb:282:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:365:in `__send__'
/usr/lib/ruby/1.8/active_record/migration.rb:365:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:491:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:565:in `call'
/usr/lib/ruby/1.8/active_record/migration.rb:565:in `ddl_transaction'
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/lib/ruby/1.8/active_record/transactions.rb:182:in `transaction'
/usr/lib/ruby/1.8/active_record/migration.rb:565:in `ddl_transaction'
/usr/lib/ruby/1.8/active_record/migration.rb:490:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:477:in `each'
/usr/lib/ruby/1.8/active_record/migration.rb:477:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:401:in `up'
/usr/lib/ruby/1.8/active_record/migration.rb:383:in `migrate'
/usr/share/redmine/vendor/plugins/engines/lib/engines/plugin/migrator.rb:20:in `migrate_plugin'
/usr/share/redmine/config/../vendor/plugins/engines/lib/engines/plugin.rb:93:in `migrate'
/usr/share/redmine/lib/tasks/migrate_plugins.rake:8
/usr/share/redmine/lib/tasks/migrate_plugins.rake:5:in `each'
/usr/share/redmine/lib/tasks/migrate_plugins.rake:5
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

History

#1 Updated by Pedro Algarvio almost 13 years ago

I had to manually insert “1-sense” into the migrations table

#2 Updated by Andriy Lesyuk almost 13 years ago

  • Status changed from New to Incomplete
  • Assignee set to Andriy Lesyuk

This usually happens when migrate script is called from another plugin (run from different plugin directory name .e.g) or renamed... Was anything like this?

In any way it does not look to be a plugin problem.

#3 Updated by Pedro Algarvio almost 13 years ago

Andriy Lesyuk wrote:

This usually happens when migrate script is called from another plugin (run from different plugin directory name .e.g) or renamed... Was anything like this?

In any way it does not look to be a plugin problem.

Well, probably. Initially I checked out the plugin as google_ads I think, and then renamed it to sense when I found out that that was it’s name.

#4 Updated by Andriy Lesyuk almost 13 years ago

  • Due date set to 17 Jun 2011
  • Status changed from Incomplete to Won't Fix

So let’s close this bug as far as it’s a common installation issue and not plugin bug...

#5 Updated by Andriy Lesyuk almost 11 years ago

  • Target version deleted (1.0.0)

Also available in: Atom PDF

Terms of use | Privacy policy