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

Allow skipping the index when using add_belongs_to in migrations #1002

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

jwoertink
Copy link
Member

Fixes #999

When using add_belongs_to in migrations, it creates an index by default, but if you need an escape hatch to skip that, you can now pass index: false.

add_belongs_to user : User, on_delete: :cascade, index: false

@jwoertink jwoertink merged commit 8f39cc4 into main Mar 9, 2024
9 checks passed
@jwoertink jwoertink deleted the issues/999 branch March 9, 2024 21:19
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.

add_belongs_to migration method should have an option to skip the index
1 participant