Add writeLog for relation update sync metadata (#4136)
* Add writeLog for relation update sync metadata * fix health check
This commit is contained in:
@ -209,12 +209,16 @@ export class RelationMetadataHealthService {
|
||||
});
|
||||
}
|
||||
|
||||
if (relationMetadata.onDeleteAction !== relationColumn.onDeleteAction) {
|
||||
if (
|
||||
relationMetadata.onDeleteAction?.replace(/_/g, ' ') !==
|
||||
relationColumn.onDeleteAction
|
||||
) {
|
||||
issues.push({
|
||||
type: WorkspaceHealthIssueType.RELATION_FOREIGN_KEY_ON_DELETE_ACTION_CONFLICT,
|
||||
fromFieldMetadata,
|
||||
toFieldMetadata,
|
||||
relationMetadata,
|
||||
columnStructure: relationColumn,
|
||||
message: `Relation ${relationMetadata.id} foreign key onDeleteAction is not properly set`,
|
||||
});
|
||||
}
|
||||
|
||||
@ -64,6 +64,12 @@ export class SyncWorkspaceLoggerService {
|
||||
storage.relationMetadataCreateCollection,
|
||||
);
|
||||
|
||||
// Save relation metadata update collection
|
||||
await this.commandLogger.writeLog(
|
||||
'relation-metadata-update-collection',
|
||||
storage.relationMetadataUpdateCollection,
|
||||
);
|
||||
|
||||
// Save relation metadata delete collection
|
||||
await this.commandLogger.writeLog(
|
||||
'relation-metadata-delete-collection',
|
||||
|
||||
Reference in New Issue
Block a user