liquidweb / woocommerce-custom-orders-table

Store WooCommerce order data in a custom table for improved performance.
GNU General Public License v3.0
476 stars 51 forks source link

Additional cli script- delete saved post meta #145

Closed blobaugh closed 2 years ago

blobaugh commented 5 years ago

Describe the bug After a migration with --save-post-meta there will be duplicate data in the db. It can be preferable to use the flag on large data sets (prevents IO thrashing) and when testing the plugin to have a quick turn off and still have data method.

Currently there is no method to retroactively remove the post meta that was saved. Having an additional script that will remove the meta would be handy as we currently are manually performing that operation.

To Reproduce Steps to reproduce the behavior:

  1. Run a migration with the --save-post-meta flag
  2. See there the save meta
  3. Have no easy way to remove the meta

Expected behavior Create an additional cli script that will clean up the saved post meta.

blobaugh commented 5 years ago

Related to #133

stevegrunwell commented 4 years ago

I absolutely love this idea! We could even take it a step further and include a --careful or similar mode where it will only delete the post_meta entry if the corresponding column in the custom table matches (and, if they don't, prompt what to do).

jordan26 commented 4 years ago

Was there any progress on this? I too would prefer to save the data, give it a few days to confirm all is well then run a command to delete all that saved data.