Updates
This commit is contained in:
+4
@@ -45,6 +45,9 @@ function default_1({ currentDbSchema, currentTableSchema, currentTableSchemaInde
|
||||
if (targetChildTableParentDatabaseTable === null || targetChildTableParentDatabaseTable === void 0 ? void 0 : targetChildTableParentDatabaseTable.childTable) {
|
||||
targetChildTableParentDatabase.tables[targetChildTableParentDatabaseTableIndex].fields = [...currentTableSchema.fields];
|
||||
targetChildTableParentDatabase.tables[targetChildTableParentDatabaseTableIndex].indexes = [...(currentTableSchema.indexes || [])];
|
||||
targetChildTableParentDatabase.tables[targetChildTableParentDatabaseTableIndex].uniqueConstraints = [
|
||||
...(currentTableSchema.uniqueConstraints || []),
|
||||
];
|
||||
(0, grab_required_database_schemas_1.writeUpdatedDbSchema)({
|
||||
dbSchema: targetChildTableParentDatabase,
|
||||
userId,
|
||||
@@ -133,6 +136,7 @@ function default_1({ currentDbSchema, currentTableSchema, currentTableSchemaInde
|
||||
targetParentDatabaseTable.fields;
|
||||
newCurrentDbSchema.tables[currentTableSchemaIndex].indexes =
|
||||
targetParentDatabaseTable.indexes;
|
||||
newCurrentDbSchema.tables[currentTableSchemaIndex].uniqueConstraints = targetParentDatabaseTable.uniqueConstraints;
|
||||
(0, grab_required_database_schemas_1.writeUpdatedDbSchema)({ dbSchema: targetParentDatabase, userId });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user