Fix primary key assignment from out of line PK constraints in pg
This commit is contained in:
parent
cb9e49b74c
commit
2704a007b8
@ -102,7 +102,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
|
|||||||
if (d.constraint_type === "primary key") {
|
if (d.constraint_type === "primary key") {
|
||||||
d.definition.forEach((c) => {
|
d.definition.forEach((c) => {
|
||||||
table.fields.forEach((f) => {
|
table.fields.forEach((f) => {
|
||||||
if (f.name === c.column && !f.primary) {
|
if (f.name === c.column.expr.value && !f.primary) {
|
||||||
f.primary = true;
|
f.primary = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user