Implemented Soft delete#302
Merged
Merged
Conversation
|
@Chinonso-Peter Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
please fix CI |
Contributor
Author
|
check @RUKAYAT-CODER and i'll be sure to support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented.
Soft delete is now wired into the audited delete flows by adding @DeleteDateColumn() to the affected entities and replacing hard deletes with softDelete/softRemove. The main behavior changes are in users.service (line 26), courses.service (line 185), tenancy.service (line 30), localization.service (line 151), automation.service (line 130), segmentation.service (line 123), and backup-queue.processor.ts (line 231). Parent deletes now also soft-delete dependent children where the old flow implied removal, like course modules/lessons, tenant-related records, automation actions/triggers, segment rules, campaign recipients, and assessment questions.
I also covered the main soft-delete edge cases: user and tenant uniqueness checks now look withDeleted to avoid ugly DB-level collisions, and localization create/import restores a previously deleted translation instead of failing on the unique key. npm run typecheck passed. I could not fully run lint:ci or format:check in this workspace because the local eslint/prettier CLIs are not available here, and npm ci is currently blocked by an out-of-sync lockfile.
closes #296