Skip to content

Commit

Permalink
Added comment [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Nov 8, 2022
1 parent afa36d7 commit b266d41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/strong_migrations/adapters/abstract_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def target_version(target_version)
version =
if target_version && StrongMigrations.developer_env?
if target_version.is_a?(Hash)
# Active Record 6.0 supports multiple databases
# but connection.pool.spec.name always returns "primary"
# in migrations with rails db:migrate
if ActiveRecord::VERSION::STRING.to_f < 6.1
raise StrongMigrations::Error, "target_version does not support multiple databases for Active Record < 6.1"
end
Expand Down

0 comments on commit b266d41

Please sign in to comment.