Skip to content

Commit 731de60

Browse files
committed
bugfix: database explorer doesn't find referenced table if names don't match case sensitive
1 parent 6e93fd1 commit 731de60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/client/tools/DatabaseTools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class DatabaseTool {
295295
type: types[i]
296296
}
297297

298-
tableNameToStructureMap.set(tableName, tableStructure);
298+
tableNameToStructureMap.set(tableName.toLocaleLowerCase(), tableStructure);
299299

300300
this.databaseStructure.tables.push(tableStructure);
301301

@@ -363,7 +363,7 @@ export class DatabaseTool {
363363
for (let ts of this.databaseStructure.tables) {
364364
for (let cs of ts.columns) {
365365
if (cs.referencesRawData != null) {
366-
let table = tableNameToStructureMap.get(cs.referencesRawData[2]);
366+
let table = tableNameToStructureMap.get(cs.referencesRawData[2]?.toLocaleLowerCase());
367367
// SQlite doesn't remove foreign key references to columns of a dropped table
368368
if(table == null) continue;
369369
let column = table.columns.find(c => c.name.toLocaleLowerCase() == cs.referencesRawData[4].toLocaleLowerCase());

0 commit comments

Comments
 (0)