mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
059d64b874
Previously Rails would generate your schema/structure dump based on the database config name. As noted on the forum in https://discuss.rubyonrails.org/t/horizontal-sharding-schema-management/78621/6 this is problematic if you want to your shards to share the same schema dump file. This is also useful for applications that might have already written a custom solution for setting the schema dump filename and want to use something upstream. We allow setting the path for the schema cache, why not the schema dump too? To do this I deprecated the old schema_file database task in favor for a new one that passes the `db_config`. The code to derive the filename from the db_config has been duplicated there and will be the correct way to determine filename in the future. Since these values are set on the config they should be accessible in the config as well. I did not need to deprecate the behavior of schema_dump because it has not been included in any release yet (other than the alpha). However the behavior is the same for false/nil. Closes #43173 Supercedes #43240 Co-authored-by: Ryan Kerr <leboshi@gmail.com> |
||
---|---|---|
.. | ||
hash_config_test.rb | ||
resolver_test.rb |