Project

General

Profile

Bug #22421

Migrations fail on Rails 5.1

Added by Tomer Brisker almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

ActiveRecord::SubclassNotFound: Invalid single-table inheritance type: Nic::Managed is not a subclass of AddExecutionToInterface::FakeNic
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/inheritance.rb:203:in `find_sti_class'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/inheritance.rb:177:in `discriminate_class_for_record'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/persistence.rb:67:in `instantiate'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/querying.rb:50:in `block (2 levels) in find_by_sql'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/result.rb:55:in `block in each'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/result.rb:55:in `each'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/result.rb:55:in `each'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/querying.rb:50:in `map'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/querying.rb:50:in `block in find_by_sql'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/querying.rb:49:in `find_by_sql'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/bullet-5.7.2/lib/bullet/active_record5.rb:23:in `find_by_sql'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/relation.rb:667:in `exec_queries'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/relation.rb:546:in `load'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/relation.rb:255:in `records'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/bullet-5.7.2/lib/bullet/active_record5.rb:48:in `records'
/home/tbrisker/.rvm/gems/ruby-2.4.1@foreman_gemset/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
/home/tbrisker/gits/foreman_remote_execution/db/migrate/20150903192731_add_execution_to_interface.rb:14:in `up'

Associated revisions

Revision 6f1017f8 (diff)
Added by Tomer Brisker almost 3 years ago

Fixes #22421 - Correct Nic migration for Rails 5

This also has an added benefit of running much faster, especially for
installations that have a large number of interfaces.

History

#1 Updated by The Foreman Bot almost 3 years ago

  • Assignee set to Tomer Brisker
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/306 added

#2 Updated by Anonymous almost 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF