Document Rails 7.2+ migrations_paths requirement#227
Open
abuhtoyarov wants to merge 1 commit intoPNixx:masterfrom
Open
Document Rails 7.2+ migrations_paths requirement#227abuhtoyarov wants to merge 1 commit intoPNixx:masterfrom
abuhtoyarov wants to merge 1 commit intoPNixx:masterfrom
Conversation
- Add documentation in README about migrations_paths requirement for Rails 7.2+ - Mark migrations_paths method as deprecated in adapter - Update README with examples for Rails 7.2+ configuration
syabruk
added a commit
to machinio/clickhouse-activerecord
that referenced
this pull request
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document Rails 7.2+ migrations_paths requirement
Problem
In Rails 7.2, the behavior of
migrations_pathschanged. Previously, Rails would call themigrations_pathsmethod on the adapter to determine the migration path. In Rails 7.2+,migrations_pathsis now read directly fromdb_config(database configuration), not from the adapter method.This means that if
migrations_pathsis not explicitly specified in thedatabase.ymlconfiguration file, Rails 7.2+ will use the default Rails migration path (db/migrate) instead of the ClickHouse adapter's default (db/migrate_clickhouse).Solution
Instead of trying to automatically set the default
migrations_paths(which would require workarounds), we document the requirement for Rails 7.2+ users to explicitly specifymigrations_pathsin theirdatabase.ymlconfiguration.Changes
README.md:
lib/active_record/connection_adapters/clickhouse_adapter.rb:
migrations_pathsmethod as@deprecatedwith documentation explaining the Rails 7.2+ requirementImpact
migrations_pathsindatabase.ymlto use custom migration pathsMigration Guide
For Rails 7.2+ users, update your
database.yml:Related
migrations_pathsis read from adaptersInternalMetadataandMigrationContextto belong to the poolmigrations_pathsis now read fromdb_configviaConnectionPool#migrations_pathsmethod instead of adapter methodmigrations_pathsinConnectionPooluses:db_config.migrations_paths || Migrator.migrations_paths