Skip to content
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

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

evsasse
Copy link
Contributor

@evsasse evsasse commented Jan 1, 2025

Would be awesome if we can also back-port this to a v7.2.1 WDYT? @lvonk

@@ -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
Copy link
Contributor Author

@evsasse evsasse Jan 1, 2025

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.

Copy link
Member

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?

Copy link
Contributor Author

@evsasse evsasse Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense... Done ✅

Copy link
Member

@erikrozendaal erikrozendaal left a 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.

@@ -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
Copy link
Member

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?

@erikrozendaal
Copy link
Member

@evsasse thanks! I've also created a v7.x branch so you can make a PR to support ActiveRecord 8 if you wish. In this case the if around legacy_connection_handling will still be required.

@erikrozendaal erikrozendaal merged commit f8029c8 into zilverline:master Jan 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants