aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
authorRyan Wallace <rywall@gmail.com>2015-03-15 16:03:56 -0700
committerRyan Wallace <rywall@gmail.com>2015-03-17 10:43:26 -0700
commit7ab36f4532c891e8a4bdaee8924a197311ff25ff (patch)
treebe5515f76dd555cf9685ef1f2d390aa9a9aeed7c /activerecord/lib/active_record/core.rb
parent80f66d405ce0e7c9be1ddf599104b9bcfe6c0e88 (diff)
downloadrails-7ab36f4532c891e8a4bdaee8924a197311ff25ff.tar.gz
rails-7ab36f4532c891e8a4bdaee8924a197311ff25ff.tar.bz2
rails-7ab36f4532c891e8a4bdaee8924a197311ff25ff.zip
Add config.active_record.dump_schemas.
Fixes db:structure:dump when using schema_search_path and PostgreSQL extensions. Closes #17157.
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 82edc4eda5..9a39a0e919 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -85,6 +85,15 @@ module ActiveRecord
mattr_accessor :dump_schema_after_migration, instance_writer: false
self.dump_schema_after_migration = true
+ ##
+ # :singleton-method:
+ # Specifies which database schemas to dump when calling db:structure:dump.
+ # If :schema_search_path (the default), it will dumps any schemas listed in schema_search_path.
+ # Use :all to always dumps all schemas regardless of the schema_search_path.
+ # A string of comma separated schemas can also be used to pass a custom list of schemas.
+ mattr_accessor :dump_schemas, instance_writer: false
+ self.dump_schemas = :schema_search_path
+
mattr_accessor :maintain_test_schema, instance_accessor: false
mattr_accessor :belongs_to_required_by_default, instance_accessor: false