OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.4k stars 2.39k forks source link

Make the removal of non-versionable content items hard deletes #1238

Open pgy866 opened 6 years ago

pgy866 commented 6 years ago

Delete the published content entries, the database still save the data, delete content is not synchronized. 删除发布的内容条目,数据库内依旧保存数据,不同步删除内容。

Do not know, is this design, or wrong? 不知道是不是就是这样设计的,还是一个错误呢?

Can provide an action UI to completely delete deleted content? Keep clean database files. 可以提供彻底删除已删除内容的操作UI吗?保留干净的数据库文件。

1

2

3

4

sebastienros commented 6 years ago

This is intentional, these are soft deletes. The records are kept but flagged as deleted, to preserve history. In the future we'll have a module to prune this data.

EternityTeam commented 5 years ago

@sebastienros Has this module been completed? In the latest development version, I found that logical deletion is still the default.

sebastienros commented 5 years ago

No, there is no such module. But I think there is an option on the content type to make the items non-versionable, in which case it won't store the previous versions.

EternityTeam commented 5 years ago

@sebastienros Yes, when I turn off the versionable option for content types, it does not generate multiple historical records after many modifications, but when I delete this content item, it sets the values of Latest and Published fields of the ContentItemIndex table to zero and the Id field gets a new value without deleting the index record, and the record in the Document table still exists.

I had delete the content item from UI,but...

QQ截图20190524024809 QQ截图20190524024846

sebastienros commented 5 years ago

Maybe an issue, if a content item is not versionable and deleted we could get rid of it.