Skip to content

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

Add unique ID to new enum objects in fromPostgres function (#1142)

tahinasoa randrianarimananaf36edaa2ae71
diff --git a/src/utils/importSQL/postgres.js b/src/utils/importSQL/postgres.js
index ddee8b90..a88677be 100644
--- a/src/utils/importSQL/postgres.js
+++ b/src/utils/importSQL/postgres.js
@@ -284,6 +284,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {
const newEnum = {
name: e.name.name,
values: e.create_definitions.value.map((x) => x.value),
+ id : nanoid()
};
enums.push(newEnum);
} else if (Array.isArray(e.create_definitions)) {