brew services stop php
brew services stop mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# admin emails | |
UPDATE admin_user AS tb SET tb.email = CONCAT('customer', tb.user_id, '@mailinator.com'); | |
# Customers | |
UPDATE customer_entity AS tb SET tb.email = CONCAT('customer', tb.entity_id, '@mailinator.com'); | |
# Newsletter Subscribers | |
UPDATE newsletter_subscriber AS tb SET tb.subscriber_email = REPLACE (tb.subscriber_email,(SUBSTRING_INDEX(SUBSTR(tb.subscriber_email, INSTR(tb.subscriber_email, '@') + 1),'.',5)), 'mailinator.com'); | |
# Sales Flat Orders |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SOURCE_ROOT_DIR="/var/www" | |
SOURCE_DUMP_FILENAME=example_prod_$(date +%F).sql.gz | |
TARGET_DB_NAME="example_prod" | |
TARGET_DB_HOST="localhost" | |
TARGET_DB_USER="example" | |
TARGET_DB_PASS="example" | |
TARGET_ROOT_DIR="/var/www" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ---------------------------------- | |
select "Deleting all but 50 customers" debug; | |
drop procedure if exists minify_customers; | |
delimiter # | |
create procedure minify_customers() | |
begin | |
select @remaining_customers := count(*) from `customer_entity`; | |
while @remaining_customers > 50 do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ---------------------------------- | |
select "Deleting all but 50 customers" debug; | |
drop procedure if exists minify_customers; | |
delimiter # | |
create procedure minify_customers() | |
begin | |
select @remaining_customers := count(*) from `customer_entity`; | |
while @remaining_customers > 50 do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SOURCE_DB_NAME="example_prod" | |
SOURCE_ROOT_DIR="/var/www/prod" | |
SOURCE_DUMP_FILENAME=example_prod_$(date +%F).sql.gz | |
TARGET_DB_NAME="example_stage" | |
TARGET_ROOT_DIR="/var/www/stage" | |
TARGET_SSH_USER="www-stage" | |
TARGET_SSH_HOST="stage.example.com" |