1: No its not a good idea
but its possible
2: I wrote a command to check what tables that contains a status field:
domedan@Host:/usr/local/src/vicidial/trunk$ cat extras/MySQL_AST_CREATE_tables.sql | tr -d '\n' | sed 's/;/;\n/g' |grep 'CREATE'| grep 'status VARCHAR' | cut -d' ' -f 3
phones
park_log
vicidial_list
vicidial_live_agents
vicidial_log
vicidial_closer_log
vicidial_campaigns
vicidial_statuses
vicidial_campaign_statuses
vicidial_campaign_hotkeys
vicidial_agent_log
vicidial_callbacks
vicidial_lead_recycle
vicidial_timeclock_status
vicidial_carrier_log
vicidial_list_update_log
twoday_vicidial_log
twoday_vicidial_closer_log
twoday_vicidial_agent_log
vicidial_agent_skip_log
vicidial_log_noanswer
vicidial_qc_agent_log
vicidial_email_list
vicidial_nanpa_filter_log
But not all of those is what you need to update,
so you can change the command a little and get a list of querys you can run to find out if the status you are looking for is in the tables:
domedan@Host:/usr/local/src/vicidial/trunk$ for table in $(cat extras/MySQL_AST_CREATE_tables.sql | tr -d '\n' | sed 's/;/;\n/g' |grep 'CREATE'| grep 'status VARCHAR' | cut -d' ' -f 3); do echo "SELECT count(*) FROM $table WHERE status='ChangeMe';"; done
SELECT count(*) FROM phones WHERE status='ChangeMe';
SELECT count(*) FROM park_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_list WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_live_agents WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_closer_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_campaigns WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_statuses WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_campaign_statuses WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_campaign_hotkeys WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_agent_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_callbacks WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_lead_recycle WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_timeclock_status WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_carrier_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_list_update_log WHERE status='ChangeMe';
SELECT count(*) FROM twoday_vicidial_log WHERE status='ChangeMe';
SELECT count(*) FROM twoday_vicidial_closer_log WHERE status='ChangeMe';
SELECT count(*) FROM twoday_vicidial_agent_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_agent_skip_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_log_noanswer WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_qc_agent_log WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_email_list WHERE status='ChangeMe';
SELECT count(*) FROM vicidial_nanpa_filter_log WHERE status='ChangeMe';
Aint the linux CLI fantastic?