Skip to content

Conversation

@djezzzl
Copy link

@djezzzl djezzzl commented May 22, 2023

This is a cherry-picked fix that I'm kindly asking you to release for the 6.0+ version.

The original message

Recent versions of Rails support multiple database connections within the same app. It is possible for these connections to use different adapters. For example, one adapter may use SQL Server, and another uses PostgreSQL.

This gem applies some monkey patches to ActiveRecord for SQL Server compatibility. These patches could break other adapters, though, in a multiple-database scenario.

This commit modifies the patches so that they are applied only if the connection is SQL Server. If not, the original ActiveRecord implementation (super) is used instead.

Fixes #929

Recent versions of Rails support multiple database connections within
the same app. It is possible for these connections to use different
adapters. For example, one adapter may use SQL Server, and another uses
PostgreSQL.

This gem applies some monkey patches to ActiveRecord for SQL Server
compatibility. These patches could break other adapters, though, in a
multiple-database scenario.

This commit modifies the patches so that they are applied only if the
connection is SQL Server. If not, the original ActiveRecord
implementation (`super`) is used instead.

Fixes #929
@djezzzl
Copy link
Author

djezzzl commented May 22, 2023

Hi @aidanharan, @metaskills, @annaswims, @wbond, @wpolicarpo 👋

Thank you for the fantastic gem!

Could you please release this fix to the 6.0+ version, too?

@aidanharan aidanharan merged commit 7f52455 into rails-sqlserver:6-0-stable May 23, 2023
@aidanharan
Copy link
Contributor

@djezzzl I just released v6.0.3 of the gem to Rubygems with this fix.

@djezzzl djezzzl deleted the 6-0-stable branch May 23, 2023 16:28
@djezzzl
Copy link
Author

djezzzl commented May 23, 2023

Thank you very much, @aidanharan!

Have a great week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants