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

Don't try to set datetime_type for nulldb

Oliver Günther7b2015844920
diff --git a/config/initializers/postgresql_timestamp.rb b/config/initializers/postgresql_timestamp.rb
index 30687f10a21..0499ad6f4c0 100644
--- a/config/initializers/postgresql_timestamp.rb
+++ b/config/initializers/postgresql_timestamp.rb
@@ -1,2 +1,4 @@
# Use timestampz to create new timestamp columns, so that we get WITH TIME ZONE support
-ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.datetime_type = :timestamptz
+if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.datetime_type = :timestamptz
+end