@@ -5,16 +5,16 @@ module ActiveRecord::Tasks
5
5
DatabaseTasks . module_eval do
6
6
7
7
# @override patched to adapt jdbc configuration
8
- def each_current_configuration ( environment , spec_name = nil )
8
+ def each_current_configuration ( environment , name = nil )
9
9
environments = [ environment ]
10
10
environments << 'test' if environment == 'development'
11
11
12
12
environments . each do |env |
13
13
ActiveRecord ::Base . configurations . configs_for ( env_name : env ) . each do |db_config |
14
- next if spec_name && spec_name != db_config . spec_name
14
+ next if name && name != db_config . name
15
15
16
16
if db_config . database
17
- yield adapt_jdbc_config ( db_config ) , db_config . spec_name , env
17
+ yield adapt_jdbc_config ( db_config ) , db_config . name , env
18
18
end
19
19
end
20
20
end
@@ -38,7 +38,7 @@ module ActiveRecord::Tasks
38
38
def adapt_jdbc_config ( db_config )
39
39
if db_config . adapter . start_with? 'jdbc'
40
40
config = db_config . configuration_hash . merge ( adapter : db_config . adapter . sub ( /^jdbc/ , '' ) )
41
- db_config = ActiveRecord ::DatabaseConfigurations ::HashConfig . new ( db_config . env_name , db_config . spec_name , config )
41
+ db_config = ActiveRecord ::DatabaseConfigurations ::HashConfig . new ( db_config . env_name , db_config . name , config )
42
42
end
43
43
db_config
44
44
end
0 commit comments