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

adapt check for whether the database exists - nulldb fallback

ulferts4a4fb1887096
diff --git a/config/constants/open_project/null_db_fallback.rb b/config/constants/open_project/null_db_fallback.rb
index 5cc443ccd6e..5dc6ba52d08 100644
--- a/config/constants/open_project/null_db_fallback.rb
+++ b/config/constants/open_project/null_db_fallback.rb
@@ -30,7 +30,7 @@ module OpenProject
module NullDbFallback
class << self
def fallback
- ActiveRecord::Base.connection
+ ActiveRecord::Base.connection.execute("SELECT 1")
rescue ActiveRecord::NoDatabaseError => e
Rails.logger.error "Database connection could not be established: #{e}. Falling back to NullDB."
applied!