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

set up migration context directly #240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

indirect
Copy link

@indirect indirect commented Nov 7, 2024

it seems like the connection method migration_context was removed in Rails 7.2. As a result, --autofix raises a NoMethodError. With this change (largely borrowed from the Combustion gem), it should be possible to create a MigrationContext on Rails 6 and 7, even if the connection object doesn't provide one directly. At least, these changes work for me on Rails 7.2.

it seems like the connection method `migration_context` was removed in Rails 7.2 or 7.2.1, so autofix was raising a NoMethodError. With this change (largely borrowed from the Combustion gem), it should be possible to create a MigrationContext on Rails 6 and 7, even if the connection object doesn't provide one directly.
@tysongach
Copy link

Thanks - I’m running into the same issue you describe and your branch appears to fix it for me.

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