Upgrade from 1.12.1 to 1.13.1: db:migrate fails

Hallo,

I just had to restore our foreman instance from it's snapshot since I ran into
a db migration issue, see below.

As I said, the snapshot is restored and I have not much else. Anything else I
should prepare for the next time? I seems this issue is unrelated to [1].

Thanks!
[1] Bug #15920: migration CopyUnmanagedHostsToInterfaces may fail on interface conversations when ipv6 migration has not occurred - Foreman

[root@foreman ~]# foreman-rake db:seed
You have 5 pending migrations:
20160725142557 AddPxeLoaderToHost
20160727142242 AddPxeLoaderToHostgroup
20160817125655 ResetOverrideParams
20160818091420 AddOverrideFlagToFilter
20160914125418 UpdateParameterPriorities
Run rake db:migrate to update your database then try again.

[root@foreman ~]# foreman-rake db:migrate
== 20160719124942 AddMissingViewPermissions: migrating

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

undefined method override=' for #<Filter:0x00000006220190>/opt/rh/sclo-ror42/ root/usr/share/gems/gems/activemodel-4.2.5.1/lib/active_model/ attribute_methods.rb:433:inmethod_missing’
/usr/share/foreman/app/models/filter.rb:216:in enforce_override_flag' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:432:inblock in make_lambda’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:164:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:164:inblock in halting’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:inblock in call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:92:in __run_callbacks__' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:778:in_run_validation_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations/callbacks.rb:113:in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations.rb:338:invalid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:58:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:324:inassociation_valid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:312:in block in validate_collection_association' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:312:ineach’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:312:in validate_collection_association' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:217:inblock in
define_autosave_validation_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:157:in instance_eval' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:157:inblock in
define_non_cyclic_method’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:432:in block in make_lambda' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:192:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:192:in block in simple' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in block in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:ineach’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:92:inrun_callbacks
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:778:in _run_validate_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations.rb:399:inrun_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations/callbacks.rb:113:in block in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:117:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:117:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:555:inblock (2 levels) in compile’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:505:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:505:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:92:in __run_callbacks__' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:778:in_run_validation_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations/callbacks.rb:113:in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations.rb:338:invalid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:58:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:83:inperform_validations’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:43:in save!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/attribute_methods/dirty.rb:29:insave!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:291:in block in save!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:351:inblock in
with_transaction_returning_status’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/database_statements.rb:211:in
transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:220:intransaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:348:in with_transaction_returning_status' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:291:insave!’
/usr/share/foreman/app/models/role.rb:140:in add_permissions!' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-7.0.0/db/ migrate/20160719124942_add_missing_view_permissions.rb:10:inup’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:611:in exec_migration' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:592:inblock (2 levels) in migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:591:in block in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/connection_pool.rb:292:inwith_connection’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:590:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:768:inmigrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:998:in block in execute_migration_in_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:1044:inblock in ddl_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/database_statements.rb:213:in
block in transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/transaction.rb:184:inwithin_new_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/database_statements.rb:213:in
transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:220:intransaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:1044:in ddl_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:997:inexecute_migration_in_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:959:in block in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:955:ineach’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:955:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:823:inup’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:801:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/tasks/database_tasks.rb:137:inmigrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>' NoMethodError: undefined methodoverride=’ for #Filter:0x00000006220190
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/attribute_methods.rb:433:in method_missing' /usr/share/foreman/app/models/filter.rb:216:inenforce_override_flag’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:432:in block in make_lambda' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:164:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:164:in block in halting' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in block in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:ineach’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:92:inrun_callbacks
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:778:in _run_validation_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations/callbacks.rb:113:inrun_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations.rb:338:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:58:invalid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:324:in association_valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:312:inblock in
validate_collection_association’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:312:in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:312:invalidate_collection_association’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:217:in block in define_autosave_validation_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:157:ininstance_eval’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:157:in block in define_non_cyclic_method' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:432:inblock in make_lambda’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:192:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:192:inblock in simple’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:inblock in call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:92:in __run_callbacks__' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:778:in_run_validate_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations.rb:399:in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations/callbacks.rb:113:inblock in run_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:117:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:117:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:555:in block (2 levels) in compile' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:505:incall’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:505:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:92:inrun_callbacks
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:778:in _run_validation_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations/callbacks.rb:113:inrun_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations.rb:338:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:58:invalid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:83:in perform_validations' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:43:insave!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/attribute_methods/dirty.rb:29:in save!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:291:inblock in save!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:351:in block in with_transaction_returning_status' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/database_statements.rb:211:intransaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:220:in transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:348:inwith_transaction_returning_status’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:291:in save!' /usr/share/foreman/app/models/role.rb:140:inadd_permissions!’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-7.0.0/db/
migrate/20160719124942_add_missing_view_permissions.rb:10:in up' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:611:inexec_migration’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:592:in block (2 levels) in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:591:inblock in migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/connection_pool.rb:292:in
with_connection' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:590:inmigrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:768:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:998:inblock in execute_migration_in_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:1044:in block in ddl_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/database_statements.rb:213:inblock in transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/transaction.rb:184:in
`within_new_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connectio