Project

General

Profile

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

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

View differences:

Gemfile (working copy)
68 68
      when /sqlserver/
69 69
        gem "tiny_tds", "~> 2.1.2", :platforms => [:mri, :mingw, :x64_mingw]
70 70
        gem "activerecord-sqlserver-adapter", "~> 5.2.1", :platforms => [:mri, :mingw, :x64_mingw]
71
      when /postgis/
72
        gem 'pg', '~> 1.2.3'
73
        gem 'activerecord-postgis-adapter'
71 74
      else
72 75
        warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
73 76
      end
lib/redmine/database.rb (working copy)
28 28

  
29 29
      # Returns true if the database is PostgreSQL
30 30
      def postgresql?
31
        /postgresql/i.match?(ActiveRecord::Base.connection.adapter_name)
31
        /postgresql/i.match?(ActiveRecord::Base.connection.adapter_name) or /postgis/i.match?(ActiveRecord::Base.connection.adapter_name)
32 32
      end
33 33

  
34 34
      # Returns the PostgreSQL version or nil if another DBMS is used
    (1-1/1)