lib/tasks/switchman.rake in switchman-1.14.5 vs lib/tasks/switchman.rake in switchman-1.14.6

- old
+ new

@@ -18,11 +18,16 @@ end servers = servers.split(',') open = servers.delete('open') servers = servers.map { |server| DatabaseServer.find(server) }.compact - servers.concat(DatabaseServer.all.select { |server| server.config[:open] }) if open + if open + open_servers = DatabaseServer.all.select { |server| server.config[:open] } + servers.concat(open_servers) + servers << DatabaseServer.find(nil) if open_servers.empty? + servers.uniq! + end servers = DatabaseServer.all - servers if negative end servers = filter_database_servers_chain.call(servers) @@ -193,12 +198,10 @@ def self.filter_database_servers_chain @filter_database_servers_chain ||= ->(servers) { servers } end end -end -module Switchman module ActiveRecord module PostgreSQLDatabaseTasks def structure_dump(filename, extra_flags=nil) set_psql_env args = ['-s', '-x', '-O', '-f', filename]