Add table comment on import in mariadb and mysql (#411)

This commit is contained in:
1ilit 2025-04-17 18:04:55 +04:00 committed by GitHub
parent 4de49cb3cc
commit 5727c629e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;
});