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

Connect tables with foreign keys when inserting from SQL Script #1178

Closed
2 tasks done
Eddie-Hartman opened this issue Sep 12, 2020 · 6 comments
Closed
2 tasks done

Connect tables with foreign keys when inserting from SQL Script #1178

Eddie-Hartman opened this issue Sep 12, 2020 · 6 comments

Comments

@Eddie-Hartman
Copy link

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Is your feature request related to a problem? Please describe.
/pull/233
It would be nice to have diagram tables connect to each other when they have foreign keys defined when adding via a sql script.

Describe the solution you'd like
So to begin with, there is a bit of confusion if you look at the pull request listed above. There is the SQL import plugin, and a SQL import baked into Draw.io.
Neither of these support linking foreign keys between tables currently. The sql server example from the SQL import plugin looks about the closest right now, so I'm basing my example off of that.

Following these clicks produces result shown as 5:
image

Preferred output:
image

Notice the addition of the directional connector from one row to the other to indicate the relationship.

Describe alternatives you've considered
dbeaver/dbeaver#7067
Exporting from an existing diagramming software to graphml and then importing into draw.io.

Additional context
The existing advanced option (arrange, insert, advanced, from sql) for importing does not support this type of script and produces strange output:
image
Note that I used the same script as above except for adding a primary key to the personID.

CREATE TABLE Persons
(
PersonID int primary key,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);

CREATE TABLE Orders (
    OrderID int NOT NULL,
    PRIMARY KEY (OrderID),
    CONSTRAINT FK_PersonOrder FOREIGN KEY (OrderID)
    REFERENCES Persons(PersonID)
);

This could possibly be considered a separate bug, but it just seems strange that the plugin supports more than the one integrated into the core application, although in my opinion the core's output is more visually appealing especially since it includes data types.

@stale stale bot added the wontfix label Dec 23, 2020
@stale stale bot closed this as completed Dec 25, 2020
@Eddie-Hartman
Copy link
Author

@alderg @davidjgraph Sorry for the direct pings, but should I be doing something else with these submitted issues? They are getting closed due to being stale with no activity.

I can understand being busy, but then maybe extend the stale bot time? Or if they ARE being seen, acknowledge that it isn't a priority and move on? Just getting no feedback then having them closed isn't a great interaction.

@davidjgraph
Copy link
Collaborator

You're welcome to have them re-opened and marked as not stale if you don't feel it should be closed.

@davidjgraph davidjgraph reopened this Dec 28, 2020
@stale stale bot removed the wontfix label Dec 28, 2020
@davidjgraph davidjgraph added the notstale Stop the stale bot from processing label Dec 28, 2020
@cecabrera

This comment has been minimized.

@Xetoxyc
Copy link

Xetoxyc commented Dec 15, 2021

Issue exists over one year now.

Is this feature planned already ?

@davidjgraph
Copy link
Collaborator

No, I'll close to reflect this.

@davidjgraph davidjgraph removed the notstale Stop the stale bot from processing label Dec 15, 2021
@jgraph jgraph deleted a comment from stale bot Dec 15, 2021
@kddsultan
Copy link

Would be great to see the feature grow further. @davidjgraph, how could a potential contributor like me would be helpful here?

This issue was closed.
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

5 participants