dbpatterns
dbpatterns copied to clipboard
Multiple component primary keys are exported wrong
Create a table, add two fields, mark both as PRIMARY KEY. Export as Postgres. This is what's generated:
CREATE TABLE a(
f1 int PRIMARY KEY,
f2 int PRIMARY KEY
);
This is what's desired:
CREATE TABLE a(
f1 int,
f2 int,
PRIMARY KEY(f1, f2)
);