diff --git a/src/utils/importSQL/mariadb.js b/src/utils/importSQL/mariadb.js index bdc2836..6c0b775 100644 --- a/src/utils/importSQL/mariadb.js +++ b/src/utils/importSQL/mariadb.js @@ -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; }); diff --git a/src/utils/importSQL/mysql.js b/src/utils/importSQL/mysql.js index aac8fa0..3241bf8 100644 --- a/src/utils/importSQL/mysql.js +++ b/src/utils/importSQL/mysql.js @@ -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; });