Sha256: 5bc77c7e1dc858cae66a90ac8a6e252375a068c38542ef19c675cb85125ea965
Contents?: true
Size: 993 Bytes
Versions: 31
Compression:
Stored size: 993 Bytes
Contents
module ActiveRecord::Tasks DatabaseTasks.module_eval do # patched to adapt jdbc configuration def each_current_configuration(environment) environments = [environment] environments << 'test' if environment == 'development' configurations = ActiveRecord::Base.configurations.values_at(*environments) configurations.compact.each do |config| yield adapt_jdbc_config(config) unless config['database'].blank? end end # patched to adapt jdbc configuration def each_local_configuration ActiveRecord::Base.configurations.each_value do |config| next unless config['database'] if local_database?(config) yield adapt_jdbc_config(config) else $stderr.puts "This task only modifies local databases. #{config['database']} is on a remote host." end end end end MySQLDatabaseTasks.class_eval do def error_class ActiveRecord::JDBCError end end end
Version data entries
31 entries across 31 versions & 3 rubygems