Skip to content

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

Fix import index for postgres

1ilitf682abdafeae
diff --git a/src/utils/importSQL/postgres.js b/src/utils/importSQL/postgres.js
index be183d84..b6b28dcd 100644
--- a/src/utils/importSQL/postgres.js
+++ b/src/utils/importSQL/postgres.js
@@ -218,7 +218,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
index.unique = false;
if (e.index_type === "unique") index.unique = true;
index.fields = [];
- e.index_columns.forEach((f) => index.fields.push(f.column));
+ e.index_columns.forEach((f) => index.fields.push(f.column.expr.value));
let found = -1;
tables.forEach((t, i) => {