mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix structure:dump for multiple databases
ccea4cf
broke multiple database structure:dump, the current_config line
should have been deleted instead. I'm struggling to write a test for
this since the confings are passed from rake to the structure_dump
method rather than the other way around. Hoping to come up with a test
while I work on structure:load commands for multiple databases.
This commit is contained in:
parent
475a2911bb
commit
0a353a9786
1 changed files with 1 additions and 2 deletions
|
@ -317,8 +317,7 @@ db_namespace = namespace :db do
|
|||
ActiveRecord::DatabaseConfigurations.configs_for(Rails.env) do |spec_name, config|
|
||||
ActiveRecord::Base.establish_connection(config)
|
||||
filename = ActiveRecord::Tasks::DatabaseTasks.dump_filename(spec_name, :sql)
|
||||
current_config = ActiveRecord::Tasks::DatabaseTasks.current_config
|
||||
ActiveRecord::Tasks::DatabaseTasks.structure_dump(current_config, filename)
|
||||
ActiveRecord::Tasks::DatabaseTasks.structure_dump(config, filename)
|
||||
|
||||
if ActiveRecord::SchemaMigration.table_exists?
|
||||
File.open(filename, "a") do |f|
|
||||
|
|
Loading…
Reference in a new issue