Project

General

Profile

Patch #35816 ยป redmine-4.2-postgis.diff

patch file - Marcel B, 2021-08-25 17:44

View differences:

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
    (1-1/1)