Patch #35816 ยป redmine-4.2-postgis.diff
| Gemfile (working copy) | ||
|---|---|---|
|
when /sqlserver/
|
||
|
gem "tiny_tds", "~> 2.1.2", :platforms => [:mri, :mingw, :x64_mingw]
|
||
|
gem "activerecord-sqlserver-adapter", "~> 5.2.1", :platforms => [:mri, :mingw, :x64_mingw]
|
||
|
when /postgis/
|
||
|
gem 'pg', '~> 1.2.3'
|
||
|
gem 'activerecord-postgis-adapter'
|
||
|
else
|
||
|
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
|
||
|
end
|
||
| lib/redmine/database.rb (working copy) | ||
|---|---|---|
|
# Returns true if the database is PostgreSQL
|
||
|
def postgresql?
|
||
|
/postgresql/i.match?(ActiveRecord::Base.connection.adapter_name)
|
||
|
/postgresql/i.match?(ActiveRecord::Base.connection.adapter_name) or /postgis/i.match?(ActiveRecord::Base.connection.adapter_name)
|
||
|
end
|
||
|
# Returns the PostgreSQL version or nil if another DBMS is used
|
||