good-migrations icon indicating copy to clipboard operation
good-migrations copied to clipboard

Complain about any `config.autoload_paths` code used in migration?

Open steobrien opened this issue 4 years ago • 1 comments

Thanks for your work in creating and maintaining this gem.

Currently, it only warns for app: https://github.com/testdouble/good-migrations/blob/1921d7dac6f079814d7ecb36bf0a338edb304d2d/tasks/good_migrations.rake#L10

We'd love if this was configurable, or perhaps respected config.autoload_paths. The reasoning is: occasionally in our data migrations, we'll use code in /lib. Some production instances of our app may run the migrations months later, when the underlying code may have changed, and any calls to /lib are therefore potentially unsafe.

Happy to submit a PR here if this sounds appropriate!

steobrien avatar Feb 01 '21 18:02 steobrien

Valid point; would be open to a PR that simply adds the path, given that there's not much of a situation where it'd be any more OK.

On Feb 1, 2021, at 13:14, steobrien [email protected] wrote:

 Thanks for your work in creating and maintaining this gem.

Currently, it only warns for app: https://github.com/testdouble/good-migrations/blob/1921d7dac6f079814d7ecb36bf0a338edb304d2d/tasks/good_migrations.rake#L10

We'd love if this was configurable, or perhaps respected config.autoload_paths. The reasoning is: occasionally in our data migrations, we'll use code in /lib. Some production instances of our app may run the migrations months later, when the underlying code may have changed, and any calls to /lib are therefore potentially unsafe.

Happy to submit a PR here if this sounds appropriate!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

searls avatar Feb 02 '21 01:02 searls