mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
small fix
This commit is contained in:
parent
72c380cef5
commit
4fb6b49b86
@ -2,6 +2,10 @@ import type { DatabaseInfo, TableInfo, ApplicationDefinition, ViewInfo, Collecti
|
||||
import _flatten from 'lodash/flatten';
|
||||
|
||||
export function addTableDependencies(db: DatabaseInfo): DatabaseInfo {
|
||||
if (!db.tables) {
|
||||
return db;
|
||||
}
|
||||
|
||||
const allForeignKeys = _flatten(db.tables.map(x => x.foreignKeys || []));
|
||||
return {
|
||||
...db,
|
||||
|
Loading…
Reference in New Issue
Block a user