Skip to content

Commit 53027c8

Browse files
committed
Attempt to exclude spatial tables from db dump
1 parent 3bcaf73 commit 53027c8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/better_together/engine.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ class Engine < ::Rails::Engine
7777
app.config.log_tags = %i[request_id remote_ip]
7878
end
7979

80+
# Exclude postgis tables from database dumper
81+
initializer 'better_together.spatial_tables' do
82+
::ActiveRecord::SchemaDumper.ignore_tables = %w[spatial_ref_sys] + ::ActiveRecord::SchemaDumper.ignore_tables
83+
end
84+
8085
rake_tasks do
8186
load 'tasks/better_together_tasks.rake'
8287

spec/dummy/db/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.0].define(version: 2024_05_22_204901) do
13+
ActiveRecord::Schema[7.1].define(version: 2024_06_12_113954) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "pgcrypto"
1616
enable_extension "plpgsql"

0 commit comments

Comments
 (0)