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

Foreign key constraints with nullable references #40

Open
TravisCardwell opened this issue May 27, 2022 · 0 comments
Open

Foreign key constraints with nullable references #40

TravisCardwell opened this issue May 27, 2022 · 0 comments

Comments

@TravisCardwell
Copy link
Contributor

TravisCardwell commented May 27, 2022

The current API does not provide a way to annotate a table with a foreign key constraint when the column is nullable. This type of constraint is very common, as it used for optional one-to-one relations (often marked as ? or 0|1 in database software).

I implemented new functions nullableForeignKeyOnPk and nullableForeignKeyOn to support this, and I will submit a pull request.


tc-develop Documentation

TravisCardwell added a commit to TravisCardwell/beam-automigrate that referenced this issue May 27, 2022
These functions provide a way to annotate a table with a foreign key
constraint when the column is nullable.
TravisCardwell added a commit to TravisCardwell/beam-automigrate that referenced this issue May 27, 2022
These functions provide a way to annotate a table with a foreign key
constraint when the column is nullable.
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

No branches or pull requests

1 participant