Feature #36933
open
Halt Redmine boot entirely instead of showing a warning in admin/info when there are pending migrations
Added by Mischa The Evil over 2 years ago.
Updated about 1 year ago.
Description
Starting with Redmine 5.0.0 admin/info shows a warning when there are pending migrations (#35562). I think it makes no sense to let Redmine boot at all if there are pending migrations. It might even lead to data corruption in the DB.
It might be better to raise an exception and halt the boot process altogether with an initializer (e.g. /config/initializers/05-check_pending_migrations.rb) containing:
if Rails.env.production?
ActiveRecord::Migration.check_pending!
end
What do you think?
- Status changed from New to Needs feedback
- Target version set to 6.0.0
Given the confirmed potential implications of the issue, I'd would like to propose/discuss this for the upcoming (major) release.
I'm not sure if we should entirely halt the boot or we should just throw some warnings in the console.
Marius BALTEANU wrote in #note-2:
I'm not sure if we should entirely halt the boot or we should just throw some warnings in the console.
Let me put it in another way: why should we let Redmine boot into a (production) state that we know upfront, sooner or later will result in errors and/or potential data corruption? Am I missing something? Is there some use-case?
FWIW: I do agree that if we were to let Redmine halt the boot process, we should also provide a clear and meaningful error message to the user.
Also available in: Atom
PDF