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 composite foreign keys #1013

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Allow composite foreign keys #1013

wants to merge 4 commits into from

Conversation

carldr
Copy link

@carldr carldr commented Mar 27, 2024

I'm using composite foreign keys in my database, and currently Annotate complains with warnings like :

Unable to annotate app/models/monitor_base.rb: comparison of Array with Array failed
Unable to annotate app/models/monitor_base.rb: no implicit conversion of nil into Array

This pull request adds support for composite keys, with output such as :

#  fk_rails_...  ([id, default_notification_policy_id] => notification_policies.[team_id, id])
#  fk_rails_...  (owner_id => users.id)

(The PR also hacks around with Gemfile and spec/spec_helper.rb so I could get the tests to run locally on my Ruby version - those changes aren't really necessary.)

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.

None yet

1 participant