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

feat(server): logical deletion for item #698

Closed
wants to merge 15 commits into from

Conversation

nourbalaha
Copy link
Contributor

@nourbalaha nourbalaha commented Apr 24, 2023

Overview

Currently, if an item is deleted in CMS, it can never be restored. However, in the unlikely event that someone accidentally deletes the item, it will have to be restored from a database backup or re-registered. To avoid this, the item deletion will be changed to logical deletion, making it easier to restore the item from the MongoDB Atlas console if it is accidentally deleted.

What I've done

@netlify
Copy link

netlify bot commented Apr 24, 2023

Deploy Preview for reearth-cms canceled.

Name Link
🔨 Latest commit 7905f65
🔍 Latest deploy log https://app.netlify.com/sites/reearth-cms/deploys/64a3a38a46d806000865f500

@nourbalaha nourbalaha self-assigned this Apr 24, 2023
@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Attention: Patch coverage is 64.28571% with 30 lines in your changes missing coverage. Please review.

Project coverage is 55.43%. Comparing base (f9a92dd) to head (7905f65).
Report is 464 commits behind head on main.

Files with missing lines Patch % Lines
server/internal/infrastructure/mongo/item.go 63.63% 11 Missing and 5 partials ⚠️
...ternal/infrastructure/mongo/mongogit/collection.go 0.00% 11 Missing ⚠️
server/internal/usecase/interactor/item.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #698      +/-   ##
==========================================
+ Coverage   55.36%   55.43%   +0.06%     
==========================================
  Files         205      205              
  Lines       14871    14948      +77     
==========================================
+ Hits         8233     8286      +53     
- Misses       6163     6180      +17     
- Partials      475      482       +7     
Flag Coverage Δ
server 55.43% <64.28%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
server/internal/infrastructure/memory/item.go 63.68% <100.00%> (+4.40%) ⬆️
...ver/internal/infrastructure/mongo/mongodoc/item.go 60.21% <ø> (ø)
server/pkg/item/list.go 80.00% <100.00%> (+6.92%) ⬆️
server/internal/usecase/interactor/item.go 62.21% <70.00%> (-0.40%) ⬇️
...ternal/infrastructure/mongo/mongogit/collection.go 58.64% <0.00%> (-4.28%) ⬇️
server/internal/infrastructure/mongo/item.go 75.90% <63.63%> (-2.74%) ⬇️

... and 1 file with indirect coverage changes

@mimoham24 mimoham24 marked this pull request as ready for review May 18, 2023 09:53
@mimoham24 mimoham24 requested a review from rot1024 as a code owner May 18, 2023 09:53
@yk-eukarya
Copy link
Contributor

will be closed with #951

@yk-eukarya yk-eukarya closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants