Add writeLog for relation update sync metadata (#4136)

* Add writeLog for relation update sync metadata

* fix health check
This commit is contained in:
Weiko
2024-02-22 16:02:13 +01:00
committed by GitHub
parent 4e798ba2a3
commit 70511dc860
2 changed files with 11 additions and 1 deletions

View File

@ -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`,
});
}

View File

@ -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',