[SOLVED] Failed to locate the subclass: 'OpenstackResourceQuota'

I updated manageiq from c85594 to b09425.
After the updating, when I access to “/cloud_tenant/show/1”, I get an following error:

[----] F, [2014-10-14T13:13:18.962168 #22759:c29804] FATAL – : Error caught: [ActiveRecord::SubclassNotFound] The single-table inheritance mechanism failed to locate the subclass: ‘OpenstackResourceQuota’. This error is raised because the column ‘type’ is reserved for storing the class in case of inheritance. Please rename this column if you didn’t intend it to be used for storing the inheritance class or overwrite CloudResourceQuota.inheritance_column to use another column for that information.

How do I fix it?

The sub-class was renamed in commit 6f55529 and it seems you have records in the cloud_resource_quotas table with the old name.

You can correct this two ways:

  1. Delete those records from the table and refresh the provider to repopulate them with the expected sub-class name.
  2. Run the following data migration from the rails console:
CloudResourceQuota.where(:type => "OpenstackResourceQuota").update_all(:type => "CloudResourceQuotaOpenstack")

I tried second way and the problem was fixed.
Thanks for your quick response.