Skip to content

Instantly share code, notes, and snippets.

@vojtagrec
Last active December 19, 2015 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vojtagrec/73cb75786f9ef48fed4f to your computer and use it in GitHub Desktop.
Save vojtagrec/73cb75786f9ef48fed4f to your computer and use it in GitHub Desktop.
DB cleanup for Aardvark staging
UPDATE customer_entity
SET email=CONCAT(OLD_PASSWORD(email), '@example.com')
WHERE email NOT LIKE '%aardvark%' AND email NOT LIKE '%keyup%' AND email NOT LIKE '%grec.cz';
UPDATE sales_flat_order_address
SET email=CONCAT(OLD_PASSWORD(email), '@example.com');
UPDATE sales_flat_order
SET customer_email=CONCAT(OLD_PASSWORD(customer_email), '@example.com');
UPDATE core_config_data
SET value = REPLACE(value, 'www', 'staging')
WHERE path LIKE '%base_url';
nice -n16 php -dsuhosin.executor.include.whitelist="phar" n98-magerun.phar db:dump -s "am_notfound_* report_viewed_product_index @stripped"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment