Use scope search if you are not sure?:-)
On Oct 4, 2013 12:13 PM, "Joseph Magen" <notifications@github.com> wrote:

> In db/migrate/20131003143143_fix_auditable_type2.rb:
>
> > @@ -0,0 +1,26 @@
> > +class FixAuditableType2 < ActiveRecord::Migration
> > +  def up
> > +    Audit.where(:auditable_type => 'Taxonomy').each do |audit|
> > +      taxonomy_type = Taxonomy.find_by_id(audit.auditable_id).try(:type)
> > +      audit.update_attribute(:auditable_type, taxonomy_type) if taxonomy_type
> > +    end
> > +
> > +    Audit.where(:auditable_type => ['Foreman::Model::Ovirt',
>
> I originally used a constant for the error, but Rails gave an error. I can
> generate a SQL LIKE statement %Foreman::Model% but this syntax might only
> be for postgres, not sure.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/theforeman/foreman/pull/926/files#r6763408>
> .
>