From 08ee7cdcc0b471216a3570f458a751b58a6d4887 Mon Sep 17 00:00:00 2001 From: Markus Kahl Date: Fri, 9 Oct 2015 10:19:02 +0100 Subject: [PATCH] don't mess things up for sqlite --- config/initializers/enforce_isolation_level.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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