Skip to content

Apply monkey es for SQL Server connections only (#933) #1054

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 3 commits into from
May 23, 2023
Merged

Apply monkey es for SQL Server connections only (#933) #1054

merged 3 commits into from
May 23, 2023

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 es to ActiveRecord for SQL Server compatibility. These es could break other adapters, though, in a multiple-database scenario.

This commit modifies the es 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 es to ActiveRecord for SQL Server
compatibility. These es could break other adapters, though, in a
multiple-database scenario.

This commit modifies the es 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

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

Thank you for the fantastic gem!

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

@aidanharanaidanharan 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.

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

Thank you very much, @aidanharan!

Have a great week!

Sign up for free to join this conversation on . Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants