mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 16:23:58 +00:00
fix
This commit is contained in:
@@ -19,17 +19,16 @@ function processDependencies(
|
|||||||
baseCmd: ChangeSetItem,
|
baseCmd: ChangeSetItem,
|
||||||
dbinfo: DatabaseInfo
|
dbinfo: DatabaseInfo
|
||||||
) {
|
) {
|
||||||
|
if (result.find(x => x.title == table.pureName)) return;
|
||||||
|
|
||||||
const dependencies = allForeignKeys.filter(
|
const dependencies = allForeignKeys.filter(
|
||||||
x => x.refSchemaName == table.schemaName && x.refTableName == table.pureName
|
x => x.refSchemaName == table.schemaName && x.refTableName == table.pureName
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const fk of dependencies) {
|
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 depTable = dbinfo.tables.find(x => x.pureName == fk.pureName && x.schemaName == fk.schemaName);
|
||||||
const subFkPath = [...fkPath, fk];
|
const subFkPath = [...fkPath, fk];
|
||||||
if (depTable) {
|
if (depTable && depTable.pureName != baseCmd.pureName) {
|
||||||
processDependencies(changeSet, result, allForeignKeys, subFkPath, depTable, baseCmd, dbinfo);
|
processDependencies(changeSet, result, allForeignKeys, subFkPath, depTable, baseCmd, dbinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user