News:

Support the VirtueMart project and become a member

Main Menu

Clean up custom fields table

Started by EvanGR, January 08, 2020, 13:58:36 PM

Previous topic - Next topic

EvanGR

I've noticed our database contains a lot of "bad" (redundant/unused/obsolete) entries for product<-->custom fields assignments. This became evident when we were exporting products into CSV, there were corrupted data in the custom fields.

Is there a way to re-build/cleanup the table "virtuemart_product_customfields"? (without losing useful data ofcourse)

Thanks

Studio 42

It depend what you need to cleanup, but you have to use a mysql query to delete it.

EvanGR

I was hoping for an automated process to cleanup (or rebuild) the whole table, removing obsolete values.
e.g. removal of custom field relations, for fields that are no longer present

Studio 42

I done a plugin to clear medias, you can do your own plugin for this case.