Merge pull request #3628 from opf/fix/sqlite_init_support

don't mess things up for sqlite
pull/3640/head
Oliver Günther 9 years ago
commit e97bfd830b
  1. 2
      config/initializers/enforce_isolation_level.rb

@ -46,7 +46,7 @@ module ConnectionIsolationLevel
isolation_level = 'ISOLATION LEVEL READ COMMITTED' isolation_level = 'ISOLATION LEVEL READ COMMITTED'
if OpenProject::Database.mysql?(connection) if OpenProject::Database.mysql?(connection)
connection.execute("SET SESSION TRANSACTION #{isolation_level}") connection.execute("SET SESSION TRANSACTION #{isolation_level}")
else elsif OpenProject::Database.postgresql?(connection)
connection.execute("SET SESSION CHARACTERISTICS AS TRANSACTION #{isolation_level}") connection.execute("SET SESSION CHARACTERISTICS AS TRANSACTION #{isolation_level}")
end end
end end

Loading…
Cancel
Save