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

Support composite primary keys #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fatkodima
Copy link
Contributor

Rails 7.1+ will support composite primary keys, so I extended the gem to support this. Even though that rails 7.1 is not released yet, people on rails' main can already benefit from this.

I also added testing for rails main to the CI along the way and fixed a few incorrect gemfile specifiers in the CI config file.

@@ -31,6 +31,7 @@ def detect

next if ignored?("#{table}.#{from_column.name}", config(:ignore_columns))

# TODO: Add support for composite primary keys when https://github.com/rails/rails/pull/47637 is merged.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That PR adds a proper way to define multi-column foreign keys and getting their metadata, which we can not get correctly currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was merged, so needs an update before merging this PR.

@gregnavis gregnavis force-pushed the master branch 2 times, most recently from 168d951 to d322a6e Compare October 20, 2023 14:24
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