unchained icon indicating copy to clipboard operation
unchained copied to clipboard

Introduce Soft deletion across core collections

Open pozylon opened this issue 6 years ago • 3 comments

See #48 for initial discussion

At the moment, only some collections support soft deletion, I think we should enforce this basically to almost all collections which have to live long and are referenced in orders, like:

Countries Languages Currencies Assortments Users

And at the same time, introduce a general inconsistency cleaning job, which tries to wipe unreferenced or deleted items of all kinds from the database:

  • Old Products that are not referenced in any important record (treshhold controlled)
  • Old Assortments that are not referenced in any important record (treshhold controlled)
  • ProductVariations, ProductMedia, Media
  • AssortmentTexts, AssortmentProducts, AssortmentLinks
  • Bookmarks, Filters, Credentials

Users (this will be hard but important): Will have to move the referenced items to a "trash user" or completely anonymize the user for archival purposes? This also depends on laws in europe (right to forget)

pozylon avatar Mar 21 '19 14:03 pozylon

More important than I though, just ran into an issue where the removal of a currency made price queries crashing

pozylon avatar Feb 09 '21 16:02 pozylon

  • [x] Currently Assortments have no deletion flags, should they have?
  • [x] Users don’t support deletion, another issue

pozylon avatar Mar 04 '22 09:03 pozylon

Partly implemented, see above, so we postponed this to Unchained 2.0

pozylon avatar Mar 04 '22 09:03 pozylon

Assortments should have a deletion flag too because of the slug they occupy, it's not cool to have old links error just because assortment tree has been manipulated.

We already remove product and assortment linked data including images with the zombie-killer in the newest version, what is still missing though is a function that completely removes old products and assortments that have been deleted a while ago but that is only possible to a great extent when historic orders are removed too and that's up to the project to implement that.

pozylon avatar Dec 08 '22 13:12 pozylon

So what is still left is:

At the moment, only some collections support soft deletion, I think we should enforce that basically to almost all collections which have to live long and are referenced in orders, like:

  • [x] Assortments

pozylon avatar Dec 08 '22 13:12 pozylon