feat(postgis): enable postgis
This commit is contained in:
parent
6d8a0506e1
commit
573954c45f
3 changed files with 18 additions and 1 deletions
|
@ -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.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)
|
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
|
||||||
end
|
end
|
||||||
|
|
5
db/migrate/20230704093503_enable_postgis.rb
Normal file
5
db/migrate/20230704093503_enable_postgis.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class EnablePostgis < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
enable_extension :postgis
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,10 +10,11 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pgcrypto"
|
enable_extension "pgcrypto"
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
enable_extension "postgis"
|
||||||
enable_extension "unaccent"
|
enable_extension "unaccent"
|
||||||
|
|
||||||
create_table "action_text_rich_texts", force: :cascade do |t|
|
create_table "action_text_rich_texts", force: :cascade do |t|
|
||||||
|
|
Loading…
Reference in a new issue