mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
add Redmine::Database.sqlite? as with postgresql? and postgresql?
git-svn-id: http://svn.redmine.org/redmine/trunk@19711 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -21,6 +21,11 @@ module Redmine
|
||||
# Helper module to get information about the Redmine database
|
||||
module Database
|
||||
class << self
|
||||
# Returns true if the database is SQLite
|
||||
def sqlite?
|
||||
ActiveRecord::Base.connection.adapter_name =~ /sqlite/i
|
||||
end
|
||||
|
||||
# Returns true if the database is PostgreSQL
|
||||
def postgresql?
|
||||
/postgresql/i.match?(ActiveRecord::Base.connection.adapter_name)
|
||||
|
||||
Reference in New Issue
Block a user