Feature #36933
Halt Redmine boot entirely instead of showing a warning in admin/info when there are pending migrations
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Administration | |||
Target version: | - | |||
Resolution: |
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?