Support

Home Forums Event Espresso Premium Cleaning up Database from very old versions

Cleaning up Database from very old versions

Posted: January 17, 2022 at 8:13 am

Viewing 3 reply threads


Ryan Woodman

January 17, 2022 at 8:13 am

We have been using EE since before it was EE – 13 years or so. In that time there have been a lot of great changes.

running “garbage collector” shows many unused EE tables with “events” prefix that are duplicated into a newer format in “esp” prefix.

Are these tables deprecated and can they be removed for clarity for the developer?

Examples here:unused tables

This is the first of many steps to clean things up. End plan is to clean up and implement WP user plugin to keep people from creating duplicate accounts. We hope to create an integration with moodle and moodle cannot handle adding an enrollment if the email is already in use.

Will follow up with further topics but this is the start. Please let me know how best to proceed.

Thanks!


Tony

  • Support Staff

January 17, 2022 at 8:42 am

Hi there,

It’s great to hear from a long time user of Event Espresso/pre-Event Espresso 🙂

You’re currently running EE4 and all of the EE4 tables are prefixed with esp

The EE3 tables on your site are all prefixed with events

(From the above it looks like you know all of this anyway but just working through)

The only time EE4 uses those EE3 tables is on initial activation to migrate your EE3 data over to EE4, from there they aren’t used so if you no longer need the old data within those tables they can be removed. Meaning all of the _events_ tables can be dropped without causing any issues with EE4.

However, I do recommend creating a database backup before you make any changes here (I’m guessing you have already). The good thing about EE3’s database schema is that all of the tables are completely separate from your WP install, meaning you can export/import those tables without having to worry about issues with foreign keys mismatching (like you would with EE4 data). That means that as long as you create a backup right now and only remove the _events_ tables it is still fairly easy to get your data back into the database if needed (worst case).

That garbage collection plugin is listing _events_ tables as being used by EE4 and as long as you haven’t manually altered the prefix for EE4’s tables that’s incorrect.

Only the _esp_ tables are for EE4 by default and need to be kept.

If you want to double-check you could set up a dev copy of the site and drop the tables there, you’ll know fairly quickly if you have a missing EE4 table.


Ryan Woodman

January 17, 2022 at 12:39 pm

Staged, tested and done. Worked great and my OCD is much better. Thanks for the quick reply, Tony.

You can mark this closed and I will open another one for the next issues I need to address in my cleanup!


Tony

  • Support Staff

January 17, 2022 at 1:49 pm

You’re most welcome, I’m glad it worked for you.

Marking resolving, have a great evening.

Viewing 3 reply threads

The support post ‘Cleaning up Database from very old versions’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso