Free, simple, and intuitive online database diagram editor and SQL generator.
JavaScript databasedatabase-designdatabase-diagramdatabase-schemadbmldiagram-editoreditorer-diagramerderdiagramindexeddbmariadbmcporacle-databaseoracle-dbpostgresqlschema-designsqlsql-serversqlite
Fix remaining case sensitive foreign key comparison
zhidcf73e6f95ba
diff --git a/src/utils/importSQL/mariadb.js b/src/utils/importSQL/mariadb.jsindex 563200ef..0bcf4a12 100644--- a/src/utils/importSQL/mariadb.js+++ b/src/utils/importSQL/mariadb.js@@ -105,7 +105,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {}});});- } else if (d.constraint_type === "FOREIGN KEY") {+ } else if (d.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTableId = table.id;const startTable = e.table[0].table;@@ -187,7 +187,7 @@ export function fromMariaDB(ast, diagramDb = DB.GENERIC) {e.expr.forEach((expr) => {if (expr.action === "add" &&- expr.create_definitions.constraint_type === "FOREIGN KEY"+ expr.create_definitions.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTable = e.table[0].table;diff --git a/src/utils/importSQL/mssql.js b/src/utils/importSQL/mssql.jsindex 740f7441..71d6510d 100644--- a/src/utils/importSQL/mssql.js+++ b/src/utils/importSQL/mssql.js@@ -117,7 +117,7 @@ export function fromMSSQL(ast, diagramDb = DB.GENERIC) {}});});- } else if (d.constraint_type === "FOREIGN KEY") {+ } else if (d.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTableId = table.id;const startTable = e.table[0].table;@@ -199,7 +199,7 @@ export function fromMSSQL(ast, diagramDb = DB.GENERIC) {e.expr.forEach((expr) => {if (expr.action === "add" &&- expr.create_definitions.constraint_type === "FOREIGN KEY"+ expr.create_definitions.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTable = e.table[0].table;diff --git a/src/utils/importSQL/postgres.js b/src/utils/importSQL/postgres.jsindex 2912404c..1cdb1266 100644--- a/src/utils/importSQL/postgres.js+++ b/src/utils/importSQL/postgres.js@@ -105,7 +105,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {}});});- } else if (d.constraint_type === "FOREIGN KEY") {+ } else if (d.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTableId = table.id;const startTable = e.table[0].table;@@ -278,7 +278,7 @@ export function fromPostgres(ast, diagramDb = DB.GENERIC) {e.expr.forEach((expr) => {if (expr.action === "add" &&- expr.create_definitions.constraint_type === "FOREIGN KEY"+ expr.create_definitions.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTable = e.table[0].table;diff --git a/src/utils/importSQL/sqlite.js b/src/utils/importSQL/sqlite.jsindex 5bd3a1bd..9c89a4a1 100644--- a/src/utils/importSQL/sqlite.js+++ b/src/utils/importSQL/sqlite.js@@ -122,7 +122,7 @@ export function fromSQLite(ast, diagramDb = DB.GENERIC) {}});});- } else if (d.constraint_type === "FOREIGN KEY") {+ } else if (d.constraint_type.toLowerCase() === "foreign key") {const relationship = {};const startTableId = table.id;const startTable = e.table[0].table;