Skip to content

Commit

Permalink
Connect to the database before checking PG version
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Oct 5, 2023
1 parent e433271 commit 6752d79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/active_record/connection_adapters/chronomodel_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def chronomodel_connection(config) # :nodoc:

adapter = ChronoModel::Adapter.new(conn, logger, conn_params, config)

# Rails 7.2.0, see ifad/chronomodel#236
adapter.connect! if adapter.respond_to?(:connect!)

unless adapter.chrono_supported?
raise ChronoModel::Error, 'Your database server is not supported by ChronoModel. ' \
'Currently, only PostgreSQL >= 9.3 is supported.'
Expand Down

0 comments on commit 6752d79

Please sign in to comment.