Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add writeLog for relation update sync metadata #4136

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading