Fix remaining case sensitive foreign key comparison

This commit is contained in:
zhi 2024-10-27 20:27:47 +08:00
parent 9d68dd9185
commit dcf73e6f95
4 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;