Skip to content

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

Fix postgres index import (#459)

1ilit24712230a7d1
diff --git a/src/utils/importSQL/postgres.js b/src/utils/importSQL/postgres.js
index d99572ae..b992dead 100644
--- a/src/utils/importSQL/postgres.js
+++ b/src/utils/importSQL/postgres.js
@@ -234,7 +234,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
const index = {
name: e.index,
unique: e.index_type === "unique",
- fields: e.index_columns.map((f) => f.column),
+ fields: e.index_columns.map((f) => f.column.expr.value),
};
const table = tables.find((t) => t.name === e.table.table);