update migration check to use public active_record methods and errors - #14
Merged
emmahsax merged 5 commits intoFeb 11, 2025
Conversation
dgarwood
marked this pull request as ready for review
January 21, 2025 21:52
Contributor
Author
|
@rmm5t I'm interested in your feedback on this as well, since it looks like you did some work on this check in the past. |
rmm5t
reviewed
Jan 23, 2025
emmahsax
approved these changes
Feb 4, 2025
Member
There was a problem hiding this comment.
All of this looks great to me! Thanks @dgarwood! If @rmm5t also thinks it looks good, I'm all set to merge!
Also, if you'd like to choose what text to add to the CHANGELOG.markdown, you can add it in this PR. Something like this to lines 2-3 (but feel free to change the description text):
* Update ActiveRecordMigrationsCheck to use public active_record methods and errors
> dgarwood: https://github.com/emmahsax/okcomputer/pull/14
In a few days, if I don't hear back, I'll just merge the PR and update the file with that above text after merge.
Contributor
Author
|
@emmahsax what you have for changelog looks good to me. |
rmm5t
approved these changes
Feb 11, 2025
Member
|
v1.19.0 has officially been released with this change! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change takes a different approach to checking migrations on the app being checked by ok_computer by using the
ActiveRecord::Migration.check_pending!or.check_all_pending!methods and properly handling theActiveRecord::PendingMigrationErrorthat could be returned.This also includes checks that display an info message when rails is configured to check migrations on page load. The main change here is that OkComputer no longer fails this check for different versions of ActiveRecord.
Need to refactor tests.fixes #11