Actions
Bug #3236
openprod2dev assumes all production tables exist in development
Status:
New
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Description
I'm converting an old "production" database from before we removed Puppet from core (#2414). It has various Puppet::Rails tables in:
- puppet_tags
- resources
- resource_tags
- source_files
- param_names
- param_values
- inventory_nodes
- inventory_facts
However my new development database doesn't have these from a plain 1.3 db:migrate, so rake db:convert:prod2dev fails as these tables don't exist:
$ rake db:convert:prod2dev Converting puppet_tags...rake aborted! PG::UndefinedTable: ERROR: relation "puppet_tags" does not exist LINE 1: DELETE FROM "puppet_tags" ^ : DELETE FROM "puppet_tags" /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `exec' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `exec_no_cache' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `block in exec_delete' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/postgresql_adapter.rb:670:in `exec_delete' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb:101:in `delete' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `delete' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/relation.rb:413:in `delete_all' /home/dcleal/.rvm/gems/ruby-2.0.0-p247@foreman/gems/activerecord-3.2.14/lib/active_record/querying.rb:7:in `delete_all' /home/dcleal/code/foreman/foreman/lib/tasks/convert.rake:100:in `block (4 levels) in <top (required)>' /home/dcleal/code/foreman/foreman/lib/tasks/convert.rake:84:in `each' /home/dcleal/code/foreman/foreman/lib/tasks/convert.rake:84:in `block (3 levels) in <top (required)>'
Updated by Dominic Cleal about 11 years ago
- Related to Feature #2414: Remove Puppet from Foreman core added
Actions