Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(frontend): newly created partition's children should be diffed and marked as 'created' (#12638)

Liu Jif51f598e14ef
diff --git a/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts b/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts
index 8805d3ef80..e3ee6b333a 100644
--- a/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts
+++ b/frontend/src/components/SchemaEditorLite/algorithm/diff-merge.ts
@@ -413,6 +413,13 @@ export class DiffMerge {
// mark it as 'created'
mergedPartitions.push(targetPartition);
context.markEditStatusByKey(key, "created");
+
+ // Then mark all its subpartitions as 'created', by performing
+ // a diff from empty array to targetPartition.subpartitions
+ doMergePartitions(
+ /* sourcePartitions */ [],
+ targetPartition.subpartitions
+ );
}
}
return mergedPartitions;