Skip to content
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

Warn on unapplied migrations #1361

Closed
JoeSouthan opened this issue May 23, 2024 · 2 comments
Closed

Warn on unapplied migrations #1361

JoeSouthan opened this issue May 23, 2024 · 2 comments

Comments

@JoeSouthan
Copy link

Hi,

We use dependabot and will merge patch and minor version bumps automatically when specs pass. During investigation of #1358, we noticed we had some unapplied migrations.

Would adding something that checks the latest applied migration and either warns or raises if not applied, be something that would be useful?

Prior art:

https://github.com/que-rb/que/blob/80d6067861a41766c3adb7e29b230ce93d94c8a4/lib/que/migrations.rb#L74
https://github.com/flippercloud/flipper/blob/5aa9cfda77504922f5a95c50edc3410d6bfc1986/lib/flipper/adapters/active_record.rb#L289

Happy to implement this if so!

@bensheldon
Copy link
Owner

There is GoodJob.migrated? which returns true/false if there are pending/unapplied migrations for GoodJob.

It's mentioned in the "Upgrading minor versions" section of the Readme, but is totally overlookable 🤗

@JoeSouthan
Copy link
Author

Sorry, missed that, appreciate the push in the right direction! 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants