Project

General

Profile

Actions

Bug #1316

closed

Postgres DB Error while run rake db:migrate

Added by Florian Koch about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

i use postgres 9.1 and puppet 2.7.6 with storeconfigs on sl6.1.

after setting all up i run

RAILS_ENV=production rake db:migrate

and get

-- add_column(:host_classes, :id, :primary_key)
NOTICE:  ALTER TABLE will create implicit sequence "host_classes_id_seq" for serial column "host_classes.id" 
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "host_classes_pkey" for table "host_classes" 
   -> 0.0124s
==  CreateHostClass: migrated (0.0130s) =======================================

==  AddSuseTemplates: migrating ===============================================
==  AddSuseTemplates: migrated (0.0210s) ======================================

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
: INSERT INTO schema_migrations (version) VALUES ('20110725142054')
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:520:in `execute'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `insert_sql'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `insert'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:467:in `insert'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:550:in `record_version_state_after_migrating'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:492:in `migrate'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:565:in `call'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:565:in `ddl_transaction'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:565:in `ddl_transaction'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:490:in `migrate'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:477:in `each'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:477:in `migrate'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:401:in `up'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:383:in `migrate'
/usr/share/foreman/vendor/rails/railties/lib/tasks/databases.rake:112
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:635:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:630:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596: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:589:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:582:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2028:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2022:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997: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

if i run the command again , it complete without errors.

rgds f0

Actions

Also available in: Atom PDF