-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Deleting content items from admin leaves old versions of the content in the database #6311
Comments
I guess content Item is soft delete. |
A content item removal is intentionally a soft delete in Orchard. While there is no similar hard delete surfaced, I think |
Over time the DB is going to be littered with thousands of orphaned content item versions that have no real purpose - this doesn't seem like a great strategy and there is no easy way to clean them up either. |
I've had this problem for a long time |
If you never need those old versions for compliance reasons or to be able to restore them (with Audit Trail: #4620) then those are indeed clutter. We could surface the hard delete operation via e.g. Related: #6056 |
We need a content item trash can feature. That way we could clean up the database from some drafts/published content items manually ... audit trail apart. |
There will be a recycle bin in Audit Trail. |
Maybe we could also have a setting with the number of versions to keep for versionalble content ? And if a ContentItem is not versionable, we should do hard deletes! |
There is a checkbox to prevent version already too. |
Version rc1-12811: I have deleted all the content using admin UI and then noticed that there are still thousands of version records for these delete content items in the database.
I thought ok I will delete the rows using an SQL query but they won't delete because of a constraint: The DELETE statement conflicted with the REFERENCE constraint "XXXX_ContentItemIndex". The conflict occurred in database "XXXX", table "dbo.XXXX_ContentItemIndex", column 'DocumentId'.
Seems not right that delete content remains in the database.
The text was updated successfully, but these errors were encountered: