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

Auto swap for foreign key name #79

Closed
nchj opened this issue Apr 30, 2024 · 1 comment
Closed

Auto swap for foreign key name #79

nchj opened this issue Apr 30, 2024 · 1 comment
Assignees

Comments

@nchj
Copy link

nchj commented Apr 30, 2024

IF I create a table A with column id, Table B with column id and a_id,
then A.id and B.a_id is a one to many relation

when i drag b.a_id to a.id the relation name is called B_a_id_fk, and A is primary and B is foreign, this is correct

图片

but, when i drag a.id to b.a_id, the relation name is called A_id_fk, B is primary, A is foreign, this is not correct,
图片

so, i can use swap function to adjust which is the primary, then A is primary and B is foreign, this is correct, but the foreign key name is also called A_id_fk

图片

so can it autoamtically correct the fk name when swap?

@1ilit 1ilit self-assigned this May 6, 2024
l123wx added a commit to l123wx/drawdb that referenced this issue May 8, 2024
@l123wx
Copy link
Contributor

l123wx commented May 8, 2024

I have implemented this feature in pr #94 : )

1ilit added a commit that referenced this issue May 10, 2024
@1ilit 1ilit closed this as completed May 10, 2024
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

3 participants