kvesteri / sqlalchemy-continuum

Versioning extension for SQLAlchemy.
BSD 3-Clause "New" or "Revised" License
568 stars 128 forks source link

Complete deletion of objects and their versions #310

Open dmchmk opened 1 year ago

dmchmk commented 1 year ago

Hi! Can you please give me an advice?

For example, I have a blog app, where under every post users can save their comments and edit them. But when I delete this blog post, I want all its comments and their history to be deleted.

What is the proper way to do so?

dmchmk commented 1 year ago

hello?)

marksteward commented 1 year ago

It depends on your hierarchy, but it's probably best to explicitly delete the entries for the blog post and comments. Rolling this up to empty transactions would also need to be done manually.

Happy to consider this as a feature (along with ageing) if people think it's useful.