You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.
If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.
Describe the bug
In the example below, when converting SQL to ER-Diagram, the primary key cannot be parsed.
CREATETABLEPersons (
ID intNOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
PRIMARY KEY (ID, LastName)
);
To Reproduce
Steps to reproduce the behavior:
Go to '+'
Click on 'Advanced'
Scroll down to 'SQL'
copy and paste below code and generate
CREATETABLEPersons (
ID intNOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
PRIMARY KEY (ID, LastName)
);
See draw.io cannot parse ID, LastName as a primary key
Expected behavior
ER Diagram should check ID, LastName column as PK
Screenshots
draw.io version (In the Help->About menu of the draw.io editor):
draw.io version 21.6.6
Desktop (please complete the following information):
OS: Windows 10
Browser Firefox
Browser Version 120.0.1
Smartphone (please complete the following information):
Only checked in desktop
I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
I guess, you have to check below code.
If input has PRIMARY KEY (ID, LastName) then, below code will push "ID, LastName" string into primaryKeyList and this string will not match with any columns i guess.
@pica4500 I have a pr #4122 for the sql plugin that you have to install yourself manually (one file change) for improvements on the sql import parsing into uml diagram for draw.io.
Note on https://www.drawio.com/doc/faq/sql-plugin that this plugin is not maintained by core drawio developers, and they are closed contributions hence won't merge my pr with the improvements. This plugin should be used as-is, as an unsupported example for developers.
Preflight Checklist
You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.
If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.
Describe the bug
In the example below, when converting SQL to ER-Diagram, the primary key cannot be parsed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ER Diagram should check ID, LastName column as PK
Screenshots
draw.io version (In the Help->About menu of the draw.io editor):
Desktop (please complete the following information):
Smartphone (please complete the following information):
I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
Additional context
draw.io docs says it supports MySQL
(https://www.drawio.com/doc/faq/sql-plugin)
In MySQL docs, you can also check, this kind of multiple primary keys are supported.
(https://dev.mysql.com/doc/refman/8.0/en/partitioning-limitations-partitioning-keys-unique-keys.html)
I guess, you have to check below code.
If input has
PRIMARY KEY (ID, LastName)
then, below code will push "ID, LastName" string into primaryKeyList and this string will not match with any columns i guess.drawio/src/main/webapp/plugins/sql.js
Line 454 in 1d6d5d0
The text was updated successfully, but these errors were encountered: