add table comment on import in mariadb and mysql

This commit is contained in:
1ilit 2025-04-17 17:58:47 +04:00
parent 588f74648f
commit e36460a8fa
2 changed files with 14 additions and 0 deletions

View File

@ -161,6 +161,13 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {
}
}
});
e.table_options.forEach((opt) => {
if (opt.keyword === "comment") {
table.comment = opt.value.replace(/^["']|["']$/g, "");
}
});
table.fields.forEach((f, j) => {
f.id = j;
});

View File

@ -161,6 +161,13 @@ export function fromMySQL(ast, diagramDb = DB.GENERIC) {
}
}
});
e.table_options.forEach((opt) => {
if (opt.keyword === "comment") {
table.comment = opt.value.replace(/^["']|["']$/g, '');
}
});
table.fields.forEach((f, j) => {
f.id = j;
});