Draw.io SQL plugin sets wrong primary key

231 views Asked by At

I am generating two tables using the sql plugin in for draw.io inside confluence.

The following statement:

CREATE TABLE persons (
person_id int PRIMARY KEY,
country string,

);
CREATE TABLE countries (
country string PRIMARY KEY,
size int,
);

results in two tables where table "persons" has the country as the primary key (see screenshot). Is it a bug? Is there a way to get rid of it? Loading the tables 1 by 1 is not an option, since I am trying to import multiple tables.

Here is what I see in draw.io:

enter image description here

1

There are 1 answers

3
Paul Short On

Can you try to set the primary Keys as follows?

CREATE TABLE persons (
person_id int,
country string,
PRIMARY KEY (person_id)

);
CREATE TABLE countries (
country string,
size int,
PRIMARY KEY (country)
);