Skip to content

Free, simple, and intuitive online database diagram editor and SQL generator.

Fix pg type import (#380)

1ilited1d9a5b8570
diff --git a/src/utils/importSQL/postgres.js b/src/utils/importSQL/postgres.js
index 4f01e6af..0dd07c98 100644
--- a/src/utils/importSQL/postgres.js
+++ b/src/utils/importSQL/postgres.js
@@ -48,7 +48,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
d.definition.dataType,
),
)?.name;
- if (!type && !dbToTypes[diagramDb][type])
+ if (!type && !dbToTypes[diagramDb][d.definition.dataType])
type = affinity[diagramDb][type];
field.type = type || d.definition.dataType;