1.4.2 to 1.5.2 db:migrate failure: SQLException: no such column: hostgroups.title?

Greetings all,

I've attempted a 1.4.2 to 1.5.2 upgrade as the subject states. Below is my
db:migrate trace. I'm going to have to revert to my pre-upgrade snapshot
and can this for the weekend. I didn't see this issue in my test
environment when I made the upgrade. The production environment has been
around since the 1.x days though and my test environment was started at the
1.4.x version. Any help would be great, a column missing seems really odd
to me. Thanks.

[root@foreman ~]# foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== RemoveDuplicateSnippets: migrating

··· ======================================== rake aborted! An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: no such column: hostgroups.title: SELECT
"hostgroups".* FROM “hostgroups” INNER JOIN “template_combinations” ON
"hostgroups".“id” = “template_combinations”.“hostgroup_id” WHERE
"template_combinations".“config_template_id” = 15 ORDER BY hostgroups.title
/opt/rh/ruby193/root/usr/share/gems/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in
initialize' /opt/rh/ruby193/root/usr/share/gems/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:innew’
/opt/rh/ruby193/root/usr/share/gems/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in
prepare' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:inblock in exec_query’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in
block in log' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:ininstrument’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in
log' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:inexec_query’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in
select' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:inselect_all’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in
select_all' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:38:inblock in find_by_sql’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in
logging_query_plan' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:37:infind_by_sql’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:174:in
block in exec_queries' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/identity_map.rb:72:inwithout’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:173:in
exec_queries' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:160:inblock in to_a’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in
logging_query_plan' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:159:into_a’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:189:in
exec_queries' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:160:inblock in to_a’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in
logging_query_plan' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:159:into_a’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/finder_methods.rb:159:in
all' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/has_many_through_association.rb:173:infind_target’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_association.rb:333:in
load_target' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:44:inload_target’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:87:in
method_missing' /usr/share/foreman/lib/core_extensions.rb:42:inblock in before_destroy’
/usr/share/foreman/lib/core_extensions.rb:41:in each' /usr/share/foreman/lib/core_extensions.rb:41:inbefore_destroy’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in
_callback_before_605' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in_run__53163612099076829__destroy__2283895138634174378__callbacks’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in
__run_callback' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in_run_destroy_callbacks’
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in
run_callbacks' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:254:indestroy’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in
block in destroy' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:inblock in with_transaction_returning_status’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in
transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:intransaction’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in
with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:indestroy’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:355:in
block in destroy_all' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:355:ineach’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:355:in
destroy_all' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:353:indestroy_all’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:7:in
destroy_all' /usr/share/foreman/db/migrate/20130329195742_remove_duplicate_snippets.rb:4:inup’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:370:in
up' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:inblock (2 levels) in migrate’
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in measure' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:inblock in migrate’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in
with_connection' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:389:inmigrate’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:528:in
migrate' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:720:inblock (2 levels) in migrate’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in
call' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:inblock in ddl_transaction’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in
transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:intransaction’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in
ddl_transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:719:inblock in migrate’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in
each' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:inmigrate’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in
up' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:inmigrate’
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in
block (2 levels) in <top (required)>' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:incall’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in block in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:ineach’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in execute' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:inblock in
invoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in mon_synchronize' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:ininvoke_with_call_chain’
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in invoke' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:ininvoke_task’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in block (2 levels) in top_level' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:ineach’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in block in top_level' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:instandard_exception_handling’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in top_level' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:inblock in run’
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:inrun’
/opt/rh/ruby193/root/usr/bin/rake:32:in `'
Tasks: TOP => db:migrate

Ok, by the looks of my issue here, this seems to be related to
Bug #4393: rename ancestry label to title - Foreman. Can anyone speak to what might
cause the schema to not be updated before the db:migrate script is executed?

··· On Friday, August 1, 2014 3:18:14 PM UTC-4, Sean Alderman wrote: > > Greetings all, > > I've attempted a 1.4.2 to 1.5.2 upgrade as the subject states. Below is > my db:migrate trace. I'm going to have to revert to my pre-upgrade > snapshot and can this for the weekend. I didn't see this issue in my test > environment when I made the upgrade. The production environment has been > around since the 1.x days though and my test environment was started at the > 1.4.x version. Any help would be great, a column missing seems really odd > to me. Thanks. > > [root@foreman ~]# foreman-rake db:migrate --trace > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Invoke db:load_config (first_time) > ** Execute db:load_config > ** Execute db:migrate > == RemoveDuplicateSnippets: migrating > ======================================== > rake aborted! > An error has occurred, this and all later migrations canceled: > > SQLite3::SQLException: no such column: hostgroups.title: SELECT > "hostgroups".* FROM "hostgroups" INNER JOIN "template_combinations" ON > "hostgroups"."id" = "template_combinations"."hostgroup_id" WHERE > "template_combinations"."config_template_id" = 15 ORDER BY hostgroups.title > /opt/rh/ruby193/root/usr/share/gems/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in > `initialize' > /opt/rh/ruby193/root/usr/share/gems/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in > `new' > /opt/rh/ruby193/root/usr/share/gems/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in > `prepare' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in > `block in exec_query' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in > `block in log' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in > `instrument' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in > `log' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in > `exec_query' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in > `select' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in > `select_all' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in > `select_all' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:38:in > `block in find_by_sql' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in > `logging_query_plan' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:37:in > `find_by_sql' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:174:in > `block in exec_queries' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/identity_map.rb:72:in > `without' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:173:in > `exec_queries' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:160:in > `block in to_a' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in > `logging_query_plan' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:159:in > `to_a' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:189:in > `exec_queries' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:160:in > `block in to_a' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in > `logging_query_plan' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:159:in > `to_a' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/finder_methods.rb:159:in > `all' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/has_many_through_association.rb:173:in > `find_target' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_association.rb:333:in > `load_target' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:44:in > `load_target' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:87:in > `method_missing' > /usr/share/foreman/lib/core_extensions.rb:42:in `block in before_destroy' > /usr/share/foreman/lib/core_extensions.rb:41:in `each' > /usr/share/foreman/lib/core_extensions.rb:41:in `before_destroy' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in > `_callback_before_605' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:429:in > `_run__53163612099076829__destroy__2283895138634174378__callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in > `__run_callback' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in > `_run_destroy_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in > `run_callbacks' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:254:in > `destroy' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in > `block in destroy' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in > `block in with_transaction_returning_status' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in > `transaction' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in > `transaction' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in > `with_transaction_returning_status' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in > `destroy' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:355:in > `block in destroy_all' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:355:in > `each' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:355:in > `destroy_all' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:353:in > `destroy_all' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:7:in > `destroy_all' > /usr/share/foreman/db/migrate/20130329195742_remove_duplicate_snippets.rb:4:in > `up' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:370:in > `up' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in > `block (2 levels) in migrate' > /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in `measure' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in > `block in migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in > `with_connection' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:389:in > `migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:528:in > `migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:720:in > `block (2 levels) in migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in > `call' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in > `block in ddl_transaction' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in > `transaction' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in > `transaction' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in > `ddl_transaction' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:719:in > `block in migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in > `each' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in > `migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in > `up' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:in > `migrate' > /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in > `block (2 levels) in ' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in > invoke_with_call_chain' > /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in > `invoke_with_call_chain' > /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in > `invoke_task' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 > levels) in top_level' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in > top_level' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in > `standard_exception_handling' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in > run' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in > `standard_exception_handling' > /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run' > /opt/rh/ruby193/root/usr/bin/rake:32:in `' > Tasks: TOP => db:migrate > >

It looks like your schema is actually very out of date, at least, in
this one place.

The migration that's failing is RemoveDuplicateSnippets, but that's been
around since 1.2.0. Maybe it was somehow missed at the time, but I'd be
more concerned if there are any more.

If you're able to switch back to a 1.4 installation with your current
database, I'd try running db:migrate there first to ensure it's in a
sane state before the upgrade.

If not I could probably suggest some code to comment out to get it
through the migration, but I don't think it was expected that this old
migration would ever be running on a new codebase + database.

··· On 04/08/14 18:44, Sean Alderman wrote: > Ok, by the looks of my issue here, this seems to be related to > http://projects.theforeman.org/issues/4393. Can anyone speak to what > might cause the schema to not be updated before the db:migrate script is > executed?


Dominic Cleal
Red Hat Engineering

Running db:migrate under 1.4.2 does not seem to change the column
hostgroups.label to hostgroups.title as hoped. The migrate ran smoothly,
but…

foreman=# \d hostgroups
Table "public.hostgroups"
Column | Type |
Modifiers

··· --------------------+-----------------------------+--------------------------------------------------------- id | integer | not null default nextval('hostgroups_id_seq'::regclass) name | character varying(255) | created_at | timestamp without time zone | not null updated_at | timestamp without time zone | not null environment_id | integer | operatingsystem_id | integer | architecture_id | integer | medium_id | integer | ptable_id | integer | root_pass | character varying(255) | puppet_ca_proxy_id | integer | use_image | boolean | image_file | character varying(128) | ancestry | character varying(255) | vm_defaults | text | subnet_id | integer | domain_id | integer | puppet_proxy_id | integer | label | character varying(255) | compute_profile_id | integer |

On Tuesday, August 5, 2014 3:42:07 AM UTC-4, Dominic Cleal wrote:

On 04/08/14 18:44, Sean Alderman wrote:

Ok, by the looks of my issue here, this seems to be related to
Bug #4393: rename ancestry label to title - Foreman. Can anyone speak to what
might cause the schema to not be updated before the db:migrate script is
executed?

It looks like your schema is actually very out of date, at least, in
this one place.

The migration that’s failing is RemoveDuplicateSnippets, but that’s been
around since 1.2.0. Maybe it was somehow missed at the time, but I’d be
more concerned if there are any more.

If you’re able to switch back to a 1.4 installation with your current
database, I’d try running db:migrate there first to ensure it’s in a
sane state before the upgrade.

If not I could probably suggest some code to comment out to get it
through the migration, but I don’t think it was expected that this old
migration would ever be running on a new codebase + database.


Dominic Cleal
Red Hat Engineering

Right, the rename was in 1.5.0 so I wouldn't have expected it to.

What I was hoping was that it would run the RemoveDuplicateSnippets
migration without error, then if you subsequently upgrade to 1.5, it
wouldn't attempt to run it again.

··· -- Dominic Cleal Red Hat Engineering

On 05/08/14 17:35, Sean Alderman wrote:

Running db:migrate under 1.4.2 does not seem to change the column
hostgroups.label to hostgroups.title as hoped. The migrate ran
smoothly, but…

foreman=# \d hostgroups
Table "public.hostgroups"
Column | Type

                   Modifiers                       

--------------------±----------------------------±--------------------------------------------------------
id | integer | not null default
nextval(‘hostgroups_id_seq’::regclass)
name | character varying(255) |
created_at | timestamp without time zone | not null
updated_at | timestamp without time zone | not null
environment_id | integer |
operatingsystem_id | integer |
architecture_id | integer |
medium_id | integer |
ptable_id | integer |
root_pass | character varying(255) |
puppet_ca_proxy_id | integer |
use_image | boolean |
image_file | character varying(128) |
ancestry | character varying(255) |
vm_defaults | text |
subnet_id | integer |
domain_id | integer |
puppet_proxy_id | integer |
label | character varying(255) |
compute_profile_id | integer |

On Tuesday, August 5, 2014 3:42:07 AM UTC-4, Dominic Cleal wrote:

On 04/08/14 18:44, Sean Alderman wrote:
> Ok, by the looks of my issue here, this seems to be related to
> http://projects.theforeman.org/issues/4393
<http://projects.theforeman.org/issues/4393>.  Can anyone speak to what
> might cause the schema to not be updated before the db:migrate
script is
> executed?

It looks like your schema is actually very out of date, at least, in
this one place.

The migration that's failing is RemoveDuplicateSnippets, but that's
been
around since 1.2.0.  Maybe it was somehow missed at the time, but
I'd be
more concerned if there are any more.

If you're able to switch back to a 1.4 installation with your current
database, I'd try running db:migrate there first to ensure it's in a
sane state before the upgrade.

If not I could probably suggest some code to comment out to get it
through the migration, but I don't think it was expected that this old
migration would ever be running on a new codebase + database.

-- 
Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com
mailto:foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com
mailto:foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

I checked yesteray's production log and the RemoveDuplicateSnippets was
mentioned twice during the db:migrate execution. I will take another stab
at the upgrade as soon as time permits.

Thanks.

··· On Wednesday, August 6, 2014 4:09:16 AM UTC-4, Dominic Cleal wrote: > > Right, the rename was in 1.5.0 so I wouldn't have expected it to. > > What I was hoping was that it would run the RemoveDuplicateSnippets > migration without error, then if you subsequently upgrade to 1.5, it > wouldn't attempt to run it again. > > -- > Dominic Cleal > Red Hat Engineering > > On 05/08/14 17:35, Sean Alderman wrote: > > Running db:migrate under 1.4.2 does not seem to change the column > > hostgroups.label to hostgroups.title as hoped. The migrate ran > > smoothly, but... > > > > foreman=# \d hostgroups > > Table "public.hostgroups" > > Column | Type > > > Modifiers > > > --------------------+-----------------------------+--------------------------------------------------------- > > > id | integer | not null default > > nextval('hostgroups_id_seq'::regclass) > > name | character varying(255) | > > created_at | timestamp without time zone | not null > > updated_at | timestamp without time zone | not null > > environment_id | integer | > > operatingsystem_id | integer | > > architecture_id | integer | > > medium_id | integer | > > ptable_id | integer | > > root_pass | character varying(255) | > > puppet_ca_proxy_id | integer | > > use_image | boolean | > > image_file | character varying(128) | > > ancestry | character varying(255) | > > vm_defaults | text | > > subnet_id | integer | > > domain_id | integer | > > puppet_proxy_id | integer | > > label | character varying(255) | > > compute_profile_id | integer | > > > > > > On Tuesday, August 5, 2014 3:42:07 AM UTC-4, Dominic Cleal wrote: > > > > On 04/08/14 18:44, Sean Alderman wrote: > > > Ok, by the looks of my issue here, this seems to be related to > > > http://projects.theforeman.org/issues/4393 > > . Can anyone speak to > what > > > might cause the schema to not be updated before the db:migrate > > script is > > > executed? > > > > It looks like your schema is actually very out of date, at least, in > > this one place. > > > > The migration that's failing is RemoveDuplicateSnippets, but that's > > been > > around since 1.2.0. Maybe it was somehow missed at the time, but > > I'd be > > more concerned if there are any more. > > > > If you're able to switch back to a 1.4 installation with your > current > > database, I'd try running db:migrate there first to ensure it's in a > > sane state before the upgrade. > > > > If not I could probably suggest some code to comment out to get it > > through the migration, but I don't think it was expected that this > old > > migration would ever be running on a new codebase + database. > > > > -- > > Dominic Cleal > > Red Hat Engineering > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to foreman-user...@googlegroups.com > > <mailto:foreman-users+unsubscribe@googlegroups.com >. > > To post to this group, send email to forema...@googlegroups.com > > > <mailto:forema...@googlegroups.com >. > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > >