This commit is contained in:
2026-01-03 05:34:24 +01:00
parent f0d44092e5
commit 290dfe303c
49 changed files with 1497 additions and 1016 deletions
@@ -84,10 +84,17 @@ export default function ({
targetChildTableParentDatabase.tables[
targetChildTableParentDatabaseTableIndex
].fields = [...currentTableSchema.fields];
targetChildTableParentDatabase.tables[
targetChildTableParentDatabaseTableIndex
].indexes = [...(currentTableSchema.indexes || [])];
targetChildTableParentDatabase.tables[
targetChildTableParentDatabaseTableIndex
].uniqueConstraints = [
...(currentTableSchema.uniqueConstraints || []),
];
writeUpdatedDbSchema({
dbSchema: targetChildTableParentDatabase,
userId,
@@ -221,6 +228,9 @@ export default function ({
targetParentDatabaseTable.fields;
newCurrentDbSchema.tables[currentTableSchemaIndex].indexes =
targetParentDatabaseTable.indexes;
newCurrentDbSchema.tables[
currentTableSchemaIndex
].uniqueConstraints = targetParentDatabaseTable.uniqueConstraints;
writeUpdatedDbSchema({ dbSchema: targetParentDatabase, userId });
}