Skip to content

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

Handle enum and set value parsing

1ilitbce0aeac4837
diff --git a/src/utils/astToDiagram.js b/src/utils/astToDiagram.js
index 660e3bf5..136ffa51 100644
--- a/src/utils/astToDiagram.js
+++ b/src/utils/astToDiagram.js
@@ -21,6 +21,9 @@ export function astToDiagram(ast) {
const field = {};
field.name = d.column.column;
field.type = d.definition.dataType;
+ if (d.definition.expr && d.definition.expr.type === "expr_list") {
+ field.values = d.definition.expr.value.map((v) => v.value);
+ }
field.comment = "";
field.unique = false;
if (d.unique) field.unique = true;