Skip to content

Commit

Permalink
Merge pull request #508 from kevinjcoleman/feature/updating-octopus-v…
Browse files Browse the repository at this point in the history
…ersions

only migrate specified shards.
  • Loading branch information
thiagopradi authored Oct 21, 2018
2 parents 28aac38 + 906a4f1 commit b6cedf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/octopus/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def run_with_octopus(&block)

def migrate_with_octopus(&block)
return migrate_without_octopus(&block) unless connection.is_a?(Octopus::Proxy)

connection.send_queries_to_multiple_shards(connection.shard_names) do
shards = migrations.map(&:shards).flatten.map(&:to_s)
connection.send_queries_to_multiple_shards(shards) do
migrate_without_octopus(&block)
end
rescue ActiveRecord::UnknownMigrationVersionError => e
Expand Down

0 comments on commit b6cedf8

Please sign in to comment.