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

Fix a false positive for unindexed_foreign_keys when having foreign key on a primary key column #157

Conversation

fatkodima
Copy link
Contributor

Fixes #156.

@jdufresne
Copy link
Contributor

jdufresne commented Nov 23, 2023

@fatkodima I discovered the same false positive exists for missing_unique_indexes.

add a unique index on children(parent_id) - using `has_one` in Parent without an index can lead to duplicates

The primary key index is already unique and so doesn't require an additional one.

Would you prefer I file a new issue or is this comment here sufficient?

@fatkodima
Copy link
Contributor Author

This comment is sufficient, thanks.

@gregnavis gregnavis merged commit a7e33c6 into gregnavis:master Dec 4, 2023
61 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.

unindexed_foreign_keys: False positive for custom primary keys
3 participants