feat(postgis): enable postgis

This commit is contained in:
Paul Chavard 2023-07-04 11:38:18 +02:00
parent 6d8a0506e1
commit 573954c45f
3 changed files with 18 additions and 1 deletions

View file

@ -103,5 +103,16 @@ module TPS
config.active_record.encryption.primary_key = Rails.application.secrets.active_record_encryption.fetch(:primary_key)
config.active_record.encryption.key_derivation_salt = Rails.application.secrets.active_record_encryption.fetch(:key_derivation_salt)
# Copied from rgeo/activerecord-postgis-adapter
ActiveRecord::SchemaDumper.ignore_tables |= [
'geography_columns',
'geometry_columns',
'layer',
'raster_columns',
'raster_overviews',
'spatial_ref_sys',
'topology'
]
end
end

View file

@ -0,0 +1,5 @@
class EnablePostgis < ActiveRecord::Migration[7.0]
def change
enable_extension :postgis
end
end

View file

@ -10,10 +10,11 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_07_18_113820) do
ActiveRecord::Schema[7.0].define(version: 2023_07_18_113920) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
enable_extension "postgis"
enable_extension "unaccent"
create_table "action_text_rich_texts", force: :cascade do |t|