Skip to content

Commit 6752d79

Browse files
committed
Connect to the database before checking PG version
Close #236 Ref: rails/rails#49378
1 parent e433271 commit 6752d79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: lib/active_record/connection_adapters/chronomodel_adapter.rb

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def chronomodel_connection(config) # :nodoc:
2929

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

32+
# Rails 7.2.0, see ifad/chronomodel#236
33+
adapter.connect! if adapter.respond_to?(:connect!)
34+
3235
unless adapter.chrono_supported?
3336
raise ChronoModel::Error, 'Your database server is not supported by ChronoModel. ' \
3437
'Currently, only PostgreSQL >= 9.3 is supported.'

0 commit comments

Comments
 (0)