-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate one more feature renamed previously #580
Migrate one more feature renamed previously #580
Conversation
@miq-bot cross_repo_tests ManageIQ/manageiq, ManageIQ/manageiq-ui-classic including ManageIQ/manageiq-schema/580 |
From Pull Request: ManageIQ/manageiq-schema#580
0826e89
to
a584d47
Compare
cross repo is green 💚 |
@@ -0,0 +1,26 @@ | |||
class UpdateProductFeaturesWhereIdentifierWasRenamedSinceLasker < ActiveRecord::Migration[6.0] | |||
class MiqProductFeature < ActiveRecord::Base; end | |||
class MiqRolesFeature < ActiveRecord::Base; end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the stub is only needed in tests, we do it a little differently, and don't create the stub in the main code...can't recall how offhand, but you can search other specs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll get to this eventually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this is fixed... put the stub in the migration spec itself.
From Pull Request: ManageIQ/manageiq-schema#580
The product feature was renamed along with the others for de-explorization of ansible tower in: ManageIQ/manageiq#21108 The database migration in ManageIQ#564 handled most of the renames but one feature was missed. This commit handles automation_manager_add_provider => ems_automation_add_provider.
a584d47
to
f3d12f0
Compare
Checked commit jrafanie@f3d12f0 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint db/migrate/20210521192754_update_product_features_where_identifier_was_renamed_since_lasker.rb
|
describe 'product features update' do | ||
it "renamed features aren't removed from user roles" do | ||
features = {} | ||
UpdateProductFeaturesWhereIdentifierWasRenamedSinceLasker::FEATURE_MAPPING.each do |before, _| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super-de-dooper minor, but this can be described_class::FEATURE_MAPPING
to save yourself from the long class names.
NOTE: The PRs below are since lasker so this is needed only on master.
The product feature was renamed along with the others for de-explorization of ansible
tower in: ManageIQ/manageiq#21108
The database migration in #564
handled most of the renames but one feature was missed.
This commit handles automation_manager_add_provider => ems_automation_add_provider.