Is there a way to strip identifying data from commerce tables? I am interested in stripping personal addresses out of the  commerce_customer_profile and commerce_customer_profile_revisions database tables to sanitize the database for development purposes.

The site is using Drupal 7 and Drupal Commerce 7.x-1.13.

Has anyone come up with a way to do this?
There's nothing special about sanitizing Commerce.  When I sanitize the db, I simply delete all the info in SQL:

TRUNCATE TABLE commerce_customer_profile;
TRUNCATE TABLE commerce_customer_profile_revision;
TRUNCATE TABLE field_data_commerce_customer_address;
TRUNCATE TABLE field_revision_commerce_customer_address;
TRUNCATE TABLE field_data_commerce_customer_billing;
TRUNCATE TABLE field_revision_commerce_customer_billing;


NOTE: This is just an example.  You need to check your database and make sure you get all the relevant tables.

If you want to use dummy data instead of deleting the data outright, you can use a statement like this:

UPDATE users SET users.name = users.uid WHERE users.uid &gt; 0;


If you don't have a tool like PhpMyAdmin for accessing your database easily, I would use Sequel Pro on macOS or MySQL Workbench on Windows/Linux.

Drush has a sql-sanitize command but I have encountered several issues with it over the years.  I don't want to risk accidentally exposing anything before handing off a db to another developer, so I check the db anyway; in that case, there's no real speed advantage to using Drush vs. running the SQL myself and since I'm checking it with my own eyes I can be confident the job got done.