diff --git a/lib/octopus/migration.rb b/lib/octopus/migration.rb index d016c8ce..0317ecd7 100644 --- a/lib/octopus/migration.rb +++ b/lib/octopus/migration.rb @@ -99,7 +99,7 @@ class << self def run_with_octopus(&block) return run_without_octopus(&block) unless connection.is_a?(Octopus::Proxy) - shards = migrations.map(&:shards).flatten.map(&:to_s) + shards = migrations.map(&:shards).flatten.map(&:to_s).uniq connection.send_queries_to_multiple_shards(shards) do run_without_octopus(&block) end @@ -109,7 +109,7 @@ def run_with_octopus(&block) def migrate_with_octopus(&block) return migrate_without_octopus(&block) unless connection.is_a?(Octopus::Proxy) - shards = migrations.map(&:shards).flatten.map(&:to_s) + shards = migrations.map(&:shards).flatten.map(&:to_s).uniq connection.send_queries_to_multiple_shards(shards) do migrate_without_octopus(&block) end diff --git a/lib/octopus/version.rb b/lib/octopus/version.rb index 47839e61..704784ef 100644 --- a/lib/octopus/version.rb +++ b/lib/octopus/version.rb @@ -1,3 +1,3 @@ module Octopus - VERSION = '0.10.2' + VERSION = '0.10.3' end