k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.32k stars 164 forks source link

One-to-one relations are incorrectly exported as one-to-many in mermaid diagram #534

Open kk-mats opened 8 months ago

kk-mats commented 8 months ago

What happened

Write tbls.yml to set one-to-one relations to tables without foreign keys and create a mermaid er diagram by tbls. However, the tables were in one to many relations in exported diagram.

What you expected to happened

Exported as one to one in mermaid diagram if one to one relations are set in tbls.yml.

What stack trace or error message from tbls did you see?

No errors were shown.

Anything else we need to know?

Environment

k1LoW commented 8 months ago

Hi @kk-mats. Thank you for your report. Could you give us the schema and .tbls.yml to reproduce the situation, and the diagram to expect?

kk-mats commented 8 months ago

I added an example code here that reproduces this issue. https://github.com/kk-mats/tbls-issue-534

k1LoW commented 8 months ago

@kk-mats GREAT!!!! Thank you!!!!!

k1LoW commented 8 months ago

Released as v1.71.1.

We've fixed it, please check it out.