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

enhance t.references to create column type matching foreign primary key column #3

Open
ronen opened this issue Sep 25, 2015 · 0 comments

Comments

@ronen
Copy link
Member

ronen commented Sep 25, 2015

t.references always creates an integer column. But that won't work as a foreign key if the referenced table's id isn't an integer. For example, it might be a uuid (see Rails 4 Postgres UUID Primary Key Guide

t.references could possibly look up the primary key column type of the table being referenced, and act accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant