Guest User

Untitled

a guest
May 20th, 2018
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. # these scripts run against the db and clear out sensitive information and make the db ready for develoeprs and staging.
  2.  
  3. #admin password
  4. update admin_user set password = MD5('admin') where username = 'admin';
  5.  
  6. update core_config_data set value = '0' where path = 'admin/url/use_custom_path';
  7. update core_config_data set value = '0' where path = 'admin/url/use_custom';
  8.  
  9. #newsletter subscriber emails
  10. UPDATE newsletter_subscriber SET subscriber_email = CONCAT('subscriber_',subscriber_id, '@gosolid.net');
  11.  
  12. #consign quotes emails
  13. UPDATE consign_quote SET email = CONCAT('customer_id_', customer_id, '@gosolid.net');
  14.  
  15. SET SQL_SAFE_UPDATES = 0;
  16.  
  17. #remove all log tables
  18. TRUNCATE TABLE captcha_log;
  19. TRUNCATE TABLE log_customer;
  20. TRUNCATE TABLE log_quote;
  21. TRUNCATE TABLE log_summary;
  22. TRUNCATE TABLE log_summary_type;
  23. TRUNCATE TABLE log_url;
  24. TRUNCATE TABLE log_url_info;
  25. TRUNCATE TABLE log_visitor;
  26. TRUNCATE TABLE log_visitor_info;
  27. TRUNCATE TABLE log_visitor_online;
  28. TRUNCATE TABLE sendfriend_log;
  29. TRUNCATE TABLE dataflow_batch_export;
  30. TRUNCATE TABLE dataflow_batch_import;
  31. TRUNCATE TABLE report_event;
  32. TRUNCATE TABLE report_viewed_product_index;
  33.  
  34. #remove catalog searches
  35. SET FOREIGN_KEY_CHECKS=0;
  36. TRUNCATE `catalogsearch_query`;
  37. TRUNCATE `catalogsearch_result`;
  38. ALTER TABLE `catalogsearch_query` AUTO_INCREMENT=1;
  39. ALTER TABLE `catalogsearch_result` AUTO_INCREMENT=1;
  40. SET FOREIGN_KEY_CHECKS=1;
  41.  
  42.  
  43. UPDATE sales_flat_order SET customer_email = CONCAT('order_id_',entity_id, '@gosolid.net');
  44. UPDATE sales_flat_quote SET customer_email = CONCAT('order_id_',entity_id, '@gosolid.net');
  45. # end sales
  46.  
  47.  
  48. UPDATE customer_entity SET email = CONCAT('customer_id_',entity_id, '@gosolid.net');
  49.  
  50. SET FOREIGN_KEY_CHECKS=1;
  51.  
  52. SET SQL_SAFE_UPDATES = 0;
Add Comment
Please, Sign In to add comment