Repository navigation
erdify 0.12.0 — UNIQUE foreign keys render as 1:1 #131
FabianClemenz
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
erdify 0.12.0 is out 🎉
The
erdify[sql]DDL frontend now understands that a single-columnUNIQUEforeign key is a 1:1 relationship, and draws it accordingly instead of the previous blanket N:1.child … parent:|o--||when the FK column isNOT NULL,|o--o|when it is nullable. The child end is|obecause aUNIQUEFK caps a parent at at most one child — it never forces one to exist.UNIQUEforms are recognized: column-levelcol … UNIQUEand single-column table-levelUNIQUE (col)— anonymous or namedCONSTRAINT … UNIQUE (col). CompositeUNIQUE (a, b)stays out of scope.UKin the entity block, and--format jsongains auniqueboolean per field.Given this DDL:
erdify now emits a 1:1 edge:
(previously
customer_profile }o--|| customer— a misleading N:1).📦 Release · 📖 Docs · 📝 Changelog
All reactions