-
Notifications
You must be signed in to change notification settings - Fork 5
update migration check to use public active_record methods and errors #14
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
update migration check to use public active_record methods and errors #14
Conversation
|
@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. |
lib/ok_computer/built_in_checks/active_record_migrations_check.rb
Outdated
Show resolved
Hide resolved
lib/ok_computer/built_in_checks/active_record_migrations_check.rb
Outdated
Show resolved
Hide resolved
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.
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.
|
@emmahsax what you have for changelog looks good to me. |
|
v1.19.0 has officially been released with this change! |
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