discourse/spec/initializers
Alan Guo Xiang Tan a406316dde
DEV: Patch ActiveRecord's postgresql adapter .new_client (#33820)
This commit updates our monkey patch of
`ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.new_client` to
improve two things:

1. Improve the conditional used to determine if a database does not
   exist. Just checking that the error message contains the `database`
name is not sufficient as the value of the database name may be part of
the `host` connection param which can appear in PG error messages as
well.

2. When the PG error messages includes the `user` or `host` connection
   param. We append the original PG error message on to the original
error messge so that we don't just end up with a generic error message
that doesn't help us to figure out the actual error.
2025-09-18 11:34:37 +08:00
..
000_pg_connection_patch_spec.rb DEV: Patch ActiveRecord's postgresql adapter .new_client (#33820) 2025-09-18 11:34:37 +08:00
custom_timezones_spec.rb DEV: maps IST rails timezone to kolkata (#32896) 2025-05-26 08:56:04 +02:00
track_setting_changes_spec.rb DEV: Fix test (#22018) 2023-06-08 16:12:13 -05:00
web_hook_events_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00