This file contains 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
# All workflows | |
mysqldump --single-transaction --opt crm_zeald \ | |
--tables workflow_activities workflow_activity_actions workflow_activity_roles workflow_checklists \ | |
workflow_processes workflow_roadmap_supercedes workflow_roles workflow_task_savesearch workflow_transitions \ | |
workflow_user_roles workflow_instances workflow_instance_activities | gzip | gzip -d | mysql -u zeald -p -h zdbi-extranet-staging1-aws-az1-1.cjhfgycqq4qs.ap-southeast-2.rds.amazonaws.com crm_zeald_snapshot | |
# All products & Subscriptions | |
mysqldump --single-transaction --opt crm_zeald \ | |
--tables products prices products_groups products_job_codes services service_types | gzip | gzip -d | mysql -u zeald -p -h zdbi-extranet-staging1-aws-az1-1.cjhfgycqq4qs.ap-southeast-2.rds.amazonaws.com crm_zeald_snapshot |
This file contains 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
sshz extranetdb "mysqldump --single-transaction --opt --ignore-table=crm_zeald.accounts --ignore-table=crm_zeald.accounts_bugs --ignore-table=crm_zeald.accounts_contacts --ignore-table=crm_zeald.accounts_opportunities --ignore-table=crm_zeald.active_customers --ignore-table=crm_zeald.adodb_logsql --ignore-table=crm_zeald.agencies --ignore-table=crm_zeald.autosave --ignore-table=crm_zeald.billing --ignore-table=crm_zeald.billing_exports --ignore-table=crm_zeald.billing_exports_approval --ignore-table=crm_zeald.billing_exports_salesperson_2016_q3_model --ignore-table=crm_zeald.budgets --ignore-table=crm_zeald.bugs --ignore-table=crm_zeald.calls --ignore-table=crm_zeald.calls_contacts --ignore-table=crm_zeald.calls_resources --ignore-table=crm_zeald.calls_users --ignore-table=crm_zeald.campaign_costs --ignore-table=crm_zeald.campaigns --ignore-table=crm_zeald.cases --ignore-table=crm_zeald.cases_bugs --ignore-table=crm_zeald.cases_drafts --ignore-table=crm_zeald.catalog_domains --ignore-table=crm_zeald.change_ |
This file contains 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
@ A HOSTING_IP abeecohealth.com | |
@ A HOSTING_IP apolloenergygum.co.nz | |
@ A HOSTING_IP ballisticstudies.zes.zeald.com | |
@ A HOSTING_IP bargainrentalcars.co.nz | |
@ A HOSTING_IP beanbag.nz | |
@ A HOSTING_IP berninagisborne.co.nz | |
@ A HOSTING_IP boltofcloth.com | |
@ A HOSTING_IP bombaymotorwaystorage.co.nz | |
@ A HOSTING_IP bombaystorageltd.co.nz | |
@ A HOSTING_IP campbellconservation.co.nz |
This file contains 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
<?php | |
require_once('modules/Services/Service.php'); | |
require_once('modules/Jobs/Job.php'); | |
$jobs_sql = " | |
SELECT * | |
FROM `jobs` | |
WHERE | |
`name` LIKE BINARY '%GEM%' AND | |
`development_catalog` IS NULL |
This file contains 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
Array | |
( | |
[0] => Array | |
( | |
[job_id] => 29060a5f-6897-5f8f-9617-5ea4e77d70a5 | |
[catalog] => auntyjo | |
) | |
[1] => Array | |
( |
This file contains 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
[ | |
{ | |
"label":"image", | |
"value":[ | |
"c3.jpg", | |
"c3.jpg" | |
] | |
}, | |
{ | |
"label":"heading", |
This file contains 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
# insert to table2 where year is same with table2 using records ot table1 | |
Insert INTO emails_message_body_2019 SELECT emails_message_body.* FROM emails_message_body | |
INNER JOIN emails on emails.id = emails_message_body.email_id | |
where Year(date_entered) = 2019 | |
LIMIT 0, 100 | |
# delete from table1 where email_id is already existing in table2 | |
# this might be slow but its safe | |
DELETE FROM emails_message_body |