Skip to content
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

Upgrade from Craft 2.x to Craft 3.3.x leaves redundant tables (entry versioning) #4909

croxton opened this issue Sep 9, 2019 · 2 comments


Copy link

commented Sep 9, 2019


The following tables appear to be redundant in Craft 3.3.x, due (I presume) to the new drafts & revisions system.


Following the update the entryversions table grows in size substantially as the queue processes entries ("Updating drafts..."). In practice we are seeing it grow to almost half the size of the entire database.

Steps to reproduce

  1. Upgrade an existing website from the last Craft 2.x to Craft 3.3.x
  2. Wait for the queue to complete the "Updating drafts..." tasks

Additional info

  • Craft version:
  • PHP version: 7.2
  • Database driver & version: MySQL 5.7.2

This comment has been minimized.

Copy link

commented Sep 10, 2019

I solved this issue in my case by disabling versioning for each section in the control panel of the Craft 2 install and manually truncating the entryversions table, prior to upgrading to Craft 3.3. Resulting in a far smaller database (1/6th of the size compared to not doing so).

Perhaps a note could be added to the upgrade documentation?

@croxton croxton changed the title Upgrade from Craft 2.x to Craft 3.3.x leaves redundant tables Upgrade from Craft 2.x to Craft 3.3.x leaves redundant tables (entry versioning) Sep 10, 2019


This comment has been minimized.

Copy link

commented Sep 11, 2019

The 3.3 update leaves the old entryversions and entrydrafts tables around, plus creates the new entryversionerrors and entrydrafterrors tables, because they are needed by the Updating entry drafts and revisions job that kicks off after the update is complete. And the job will leave those tables around once it’s finished, just in case they contain any version/draft data that is still needed. (It will only convert up to 50 versions to new element revisions, or whatever your maxRevisions config setting is set to, and leave the rest in-tact in the entryversions table.)

Once you’re satisfied with the results of the Updating entry drafts and revisions job, you’re free to completely delete those tables (but NOT the new drafts or revisions tables!).

As far as reducing database size, see #4851.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.