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

Soft delete #9

Open
JavierLuna opened this issue Aug 4, 2019 · 0 comments
Open

Soft delete #9

JavierLuna opened this issue Aug 4, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JavierLuna
Copy link
Owner

Add soft delete support.
Soft deleting is when you simply mark an attribute like is_deleted=True and ignoring it in the next queries instead of actually deleting it.

Describe your usecase

No usecase, I think I'd be cool. Also, It's an old friend's idea.

Describe the problem

When deleting any entity, you actually delete it from the database. This data is not recoverable.

Solution proposed

I was thinking about boolean fields having a soft_delete=True keyword.
Also, maybe have a class property like soft_delete='field_name' but I don't quite like it.

How about having different soft delete strategies and have the user choose one?:

  • Good old is_deleted=True (normal soft delete)
  • Change the entity kind to a entity-deleted one. This way queries won't be slowed down because of a large amount of data. Win win, but could be a pain if not optional.

Examples, links...

@JavierLuna JavierLuna added the enhancement New feature or request label Aug 4, 2019
@JavierLuna JavierLuna self-assigned this Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant