mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
analyser - merge data from old structure
This commit is contained in:
parent
777f72af88
commit
4cce1f6670
@ -77,6 +77,16 @@ export class DatabaseAnalyser {
|
||||
[...(this.structure[field] || []).filter(x => !removeAllIds.includes(x.objectId)), ...newArray],
|
||||
x => x.pureName
|
||||
);
|
||||
|
||||
// merge missing data from old structure
|
||||
for (const item of res[field]) {
|
||||
const original = (this.structure[field] || []).find(x => x.objectId == item.objectId);
|
||||
if (original) {
|
||||
for (const key in original) {
|
||||
if (!item[key]) item[key] = original[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user