Add config.active_record.dump_schemas.#19347
Conversation
|
@senny @jimmykarily Here is a first pass. Feedback appreciated. :) |
There was a problem hiding this comment.
The docs should mention the default value.
There was a problem hiding this comment.
I was trying to model it after the documentation for schema_format (above) which doesn't specify the default in the doc. Should I change both?
There was a problem hiding this comment.
Let's focus on this change for now. If you have time, you can update the other in a separate PR.
|
@rywall looking good. Do you think you could add test-cases for this new functionality? |
|
👍 |
2f3108b to
8e10e5d
Compare
|
@senny I've added some tests. Anything else? |
There was a problem hiding this comment.
let's use an example with two schemas as well.
|
@rywall I added a couple comments. Thank you for your work on this 💛 |
Fixes db:structure:dump when using schema_search_path and PostgreSQL extensions. Closes rails#17157.
8e10e5d to
7ab36f4
Compare
|
I've refactored the tests to avoid side effects. I think I've addressed all you other comments as well. Thanks for your feedback. The pull request is much better for it. 👍 |
Add config.active_record.dump_schemas.
|
@rywall awesome! Thank you for your work 💛 |
|
Thanks! |
|
Thanks, @rywall! If anyone else stumbles upon this and would find this functionality useful in Rails 3 or Rails 4, I created a gem to backport this functionality to those versions of Rails: https://github.com/GUI/activerecord-postgres-dump-schemas |
|
❤️ @GUI. |
|
Thanks for this. Any plans to support pg_dump's In some cases, it might be more convenient to have a "black list", not a "white" one. |
|
For anyone looking for a way to dump extensions along with a subset of schemas, or otherwise needing extra control over |
Fixes db:structure:dump when using schema_search_path and PostgreSQL extensions.
Closes #17157.