Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add override ENV to skip migrations check

Oliver Günther3ce6d0a25852
diff --git a/config/initializers/06-pending_migrations_check.rb b/config/initializers/06-pending_migrations_check.rb
index 605aacfbb41..e98a0f1d8af 100644
--- a/config/initializers/06-pending_migrations_check.rb
+++ b/config/initializers/06-pending_migrations_check.rb
@@ -30,7 +30,8 @@
is_console = Rails.const_defined? 'Console'
no_rake_task = !(Rake.respond_to?(:application) && Rake.application.top_level_tasks.present?)
+no_override = ENV['OPENPROJECT_DISABLE__MIGRATIONS__CHECK'] != 'true'
-if Rails.env.production? && !is_console && no_rake_task
+if Rails.env.production? && !is_console && no_rake_task && no_override
ActiveRecord::Migration.check_pending! # will raise an exception and abort boot
end