Skip to content

Commit

Permalink
Harmonize calls to SafePgMigrations.get_pg_version_num with ActiveRec…
Browse files Browse the repository at this point in the history
…ord::Base.connection
  • Loading branch information
CharlesDelannoy committed Dec 11, 2023
1 parent b32aaab commit 698c9a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/IdempotentStatements/change_column_null_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def change

def skip_if_unmet_requirements
if Gem::Requirement.new('>6.1').satisfied_by?(Gem::Version.new(::ActiveRecord::VERSION::STRING)) &&
SafePgMigrations.get_pg_version_num(@connection) >= 120_000
SafePgMigrations.get_pg_version_num(ActiveRecord::Base.connection) >= 120_000
return
end

Expand Down
2 changes: 1 addition & 1 deletion test/StatementInsurer/change_column_null_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def skip_if_unmet_requirements!

def met_requirements?
Gem::Requirement.new('>6.1').satisfied_by?(Gem::Version.new(::ActiveRecord::VERSION::STRING)) &&
SafePgMigrations.get_pg_version_num(@connection) >= 120_000
SafePgMigrations.get_pg_version_num(ActiveRecord::Base.connection) >= 120_000
end
end
end

0 comments on commit 698c9a0

Please sign in to comment.