This commit is contained in:
Jan Prochazka 2021-09-28 19:46:23 +02:00
parent 5ae33a320c
commit a1bf7ddb50

View File

@ -19,17 +19,16 @@ function processDependencies(
baseCmd: ChangeSetItem,
dbinfo: DatabaseInfo
) {
if (result.find(x => x.title == table.pureName)) return;
const dependencies = allForeignKeys.filter(
x => x.refSchemaName == table.schemaName && x.refTableName == table.pureName
);
for (const fk of dependencies) {
if (fk.pureName == baseCmd.pureName) continue;
if (result.find(x => x.title == fk.pureName)) continue;
const depTable = dbinfo.tables.find(x => x.pureName == fk.pureName && x.schemaName == fk.schemaName);
const subFkPath = [...fkPath, fk];
if (depTable) {
if (depTable && depTable.pureName != baseCmd.pureName) {
processDependencies(changeSet, result, allForeignKeys, subFkPath, depTable, baseCmd, dbinfo);
}