Skip to content

Commit 14da9c0

Browse files
authored
Fix table options import (#449)
* Fix json schemas to allow string ids * Fix table options import
1 parent b7445e2 commit 14da9c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/importSQL/mariadb.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {
163163
}
164164
});
165165

166-
e.table_options.forEach((opt) => {
166+
e.table_options?.forEach((opt) => {
167167
if (opt.keyword === "comment") {
168168
table.comment = opt.value.replace(/^["']|["']$/g, "");
169169
}

src/utils/importSQL/mysql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export function fromMySQL(ast, diagramDb = DB.GENERIC) {
162162
}
163163
});
164164

165-
e.table_options.forEach((opt) => {
165+
e.table_options?.forEach((opt) => {
166166
if (opt.keyword === "comment") {
167167
table.comment = opt.value.replace(/^["']|["']$/g, "");
168168
}

0 commit comments

Comments
 (0)