craftcms/commerce

[5.x]: Lots of empty tables are created with "old" in their name

jgpadua opened this issue · 2 comments

What happened?

Description

I have the following scenario: started a new project using Craft v5 still in beta versions (for CMS and commerce). After a while of using and developing the project we noticed that lots of tables were automatically created with "old" and a sequential number in their name. My project has over 200 tables like the following image and almost all of them are empty.
In addition to this, my feeling is that the project was running slower than it should be, but I decided to wait for the stable versions for CMS and Commerce.

After having the stable versions, I noticed that the tables were not removed so I decided to clean my entire database and start the installation from scratch to ensure that all the junk from the beta version was removed. However, after installing Commerce and after a few hours of using and configuring it, I realized that more than 50 tables had already been created again in the same situation.

Is this a normal behavior? Is this a bug?

Another question, considering that I started the project in beta versions, is it really necessary to recreate the database from scratch doing a "clean" installation?

image

Craft CMS version

5.1.1

Craft Commerce version

5.0.3

PHP version

8.2.18

Operating system and version

Linux 5.4.0-1103-aws

Database type and version

Mysql 8.0.32

Image driver and version

No response

Installed plugins and versions

Blitz - 5.2.0
CKEditor - 4.0.4
Sprig - 3.0.1

It looks like you tried to install Craft or Commerce multiple times, and Craft and Commerce will attempt to make a backup of the tables (during install) that are already there, before making the new tables on install. Maybe install failed and you didn't clear out the database before running install again?

You can delete them all if Craft and Commerce is installed and working as expected, and there is no data in them that you need.