From 1942c191e0cbef80d1a0d75d5349614432b5d717 Mon Sep 17 00:00:00 2001 From: 1ilit <1ilit@proton.me> Date: Wed, 14 May 2025 13:04:55 +0400 Subject: [PATCH] Fix table options import --- src/utils/importSQL/mariadb.js | 2 +- src/utils/importSQL/mysql.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/importSQL/mariadb.js b/src/utils/importSQL/mariadb.js index f1fb610..8c7f3a8 100644 --- a/src/utils/importSQL/mariadb.js +++ b/src/utils/importSQL/mariadb.js @@ -163,7 +163,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) { } }); - e.table_options.forEach((opt) => { + e.table_options?.forEach((opt) => { if (opt.keyword === "comment") { table.comment = opt.value.replace(/^["']|["']$/g, ""); } diff --git a/src/utils/importSQL/mysql.js b/src/utils/importSQL/mysql.js index c6711da..97bcadd 100644 --- a/src/utils/importSQL/mysql.js +++ b/src/utils/importSQL/mysql.js @@ -162,7 +162,7 @@ export function fromMySQL(ast, diagramDb = DB.GENERIC) { } }); - e.table_options.forEach((opt) => { + e.table_options?.forEach((opt) => { if (opt.keyword === "comment") { table.comment = opt.value.replace(/^["']|["']$/g, ""); }