enableVersioning=false does not remove existing revisions when resaving entries #8783
-
DescriptionHi there. We have a FeedMe import that periodically imports entries. After running imports for a while we noticed that versioning was activate and causing unnecessary database bloat. I deactivated "Enable versioning for entries in this section?" but noticed that there are still many revisions for the imported entry type. I tried to run Line 1414 in 3990453 I understand that I can run Proposal for new behavior:
Steps to reproduce
Example of a sql query I cobbled together where id is of a resaved entry id '1620773' with versioning disabled. select count(*) as total_revisions, r.sourceId, siteId, uri, e.type
from revisions r, elements_sites es, elements e
where r.sourceId = es.elementId and es.elementId = e.id and r.sourceId = '1620773'
group by r.sourceId, siteId, uri, e.type
order by total_revisions DESC; Additional info
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Plus one here from me! I've got a matrix table that is up to 2million rows, as well as some other tables and it's not that big a site!! I just want to remove all those revisions (assuming that's what they are) for that one section, not the whole site and for the revisions to stop building up for that section too. |
Beta Was this translation helpful? Give feedback.
-
Actually I would even consider this a bug. After deactivating it, your users are still able to revert to an old version. |
Beta Was this translation helpful? Give feedback.
-
Bump on this. We've got the same situation, had revisions enabled for 2 sections that are updated via Feedme 3 times a day. The elements_sites table is huge now because of this (50 revisions per entry for those 2 sections). We've disabled revisions and hoped that resaving an entry would then prune all old revisions, but it doesn't. The prune revisions console command is useless for us, because that would remove revisions for all sections, which is undesirable. |
Beta Was this translation helpful? Give feedback.
-
Craft 4.2.0 is out now with a new php craft utils/prune-revisions --section=news,about (5d0192d) |
Beta Was this translation helpful? Give feedback.
Craft 4.2.0 is out now with a new
--section
option available to theutils/prune-revisions
command:(5d0192d)