-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ActiveRecord/Rails 8.0 #438
Conversation
lib/sequent/support/database.rb
Outdated
@@ -49,7 +49,7 @@ def self.establish_connection(db_config, db_config_overrides = {}) | |||
db_config = db_config.deep_merge( | |||
Sequent.configuration.primary_database_key => db_config_overrides, | |||
).stringify_keys | |||
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR < 1 | |||
if ActiveRecord::VERSION::MAJOR == 7 && ActiveRecord::VERSION::MINOR < 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change I needed to make it work here for now... Still exploring it a bit deeper against our own app.
And running the tests on this repo with ActiveRecord 8.x also confirm this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer support ActiveRecord before 7.1 so I think this if
can be completely removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense... Done ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. Looks good to me.
lib/sequent/support/database.rb
Outdated
@@ -49,7 +49,7 @@ def self.establish_connection(db_config, db_config_overrides = {}) | |||
db_config = db_config.deep_merge( | |||
Sequent.configuration.primary_database_key => db_config_overrides, | |||
).stringify_keys | |||
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR < 1 | |||
if ActiveRecord::VERSION::MAJOR == 7 && ActiveRecord::VERSION::MINOR < 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer support ActiveRecord before 7.1 so I think this if
can be completely removed?
Would be awesome if we can also back-port this to a
v7.2.1
WDYT? @lvonk