- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Police migrations #13076
Police migrations #13076
Conversation
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.
Great work!
But does this affect the usability of the users script?
db/seeds.rb
Outdated
Spree::Role.where(:name => "user").first_or_create | ||
Rails.logger.debug "[db:seed] Seeding Roles" | ||
Spree::Role.where(name: "admin").first_or_create | ||
Spree::Role.where(name: "user").first_or_create |
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 thought we got rid of "user"
, or did we just talk about it..
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.
The user role is unused at the moment. And we talked about getting rid of roles. But it's still there.
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.
Looks good 👍
@mkllnk I'll leave it to you to fix the conflict |
c375c9a
to
fcc31ff
Compare
What? Why?
I noticed in recent pull requests that new migrations were not following our style guide and CI still passed because we are ignoring all database related files.
While we don't want to change old migrations, new migrations should adhere to our current coding standards. The new configuration will enforce that.
One downside is that new migrations will grow old over time and new cops will still apply unless they support the new MigratedSchemaVersion option. So we may want to update the configuration periodically, like once a year, if it becomes inconvenient.
It's not obvious, but the MigratedSchemaVersion option applies only to some cops. Most cops still check all old migrations as well. That's why I added patterns to ignore all migrations before 2025.
What should we test?
Release notes
Changelog Category (reviewers may add a label for the release notes):
The title of the pull request will be included in the release notes.
Dependencies
Documentation updates