diff --git a/config/initializers/enforce_isolation_level.rb b/config/initializers/enforce_isolation_level.rb index 9926fb1a99..1d162d8335 100644 --- a/config/initializers/enforce_isolation_level.rb +++ b/config/initializers/enforce_isolation_level.rb @@ -46,7 +46,7 @@ module ConnectionIsolationLevel isolation_level = 'ISOLATION LEVEL READ COMMITTED' if OpenProject::Database.mysql?(connection) connection.execute("SET SESSION TRANSACTION #{isolation_level}") - else + elsif OpenProject::Database.postgresql?(connection) connection.execute("SET SESSION CHARACTERISTICS AS TRANSACTION #{isolation_level}") end end