Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/318041
Change subject: Update trigger mysql ...................................................................... Update trigger mysql Updating the trigger mysql to reflect new prospect fields. Once committed I will get Jeff to run on live to start tracking. Also, caught up in this is a new benefactor field which was created today it seems. There are also changes to the contribution_page table, dashboard tables, price set tables & pledge block. The correct mysql trigger script was run after the last update but the tidy up task of updating the committed code didn't happen. I also note a custom group has been removed. Presumably the trigger still exists for civicrm_value_1_note_11 but I don't have permission to see it. Removing fields without removing the trigger would normally cause lots of errors. I'm not quite sure whether the trigger is gone or whether we escaped errors because the whole table is gone & hence there are no updates to it. I left the drop commands in the trigger sql in case they are there. Bug: T147985 Bug: T142624 Change-Id: I8714fbcfbc3375e5bd4237c311fd826a23b63efb --- M sites/all/modules/wmf_civicrm/scripts/4.7.trigger.mysql 1 file changed, 21 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/41/318041/1 diff --git a/sites/all/modules/wmf_civicrm/scripts/4.7.trigger.mysql b/sites/all/modules/wmf_civicrm/scripts/4.7.trigger.mysql index 8e86c94..9f3d6ef 100644 --- a/sites/all/modules/wmf_civicrm/scripts/4.7.trigger.mysql +++ b/sites/all/modules/wmf_civicrm/scripts/4.7.trigger.mysql @@ -3959,7 +3959,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_contribution_page_after_insert after insert ON civicrm_contribution_page FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_contribution_page (id, title, intro_text, financial_type_id, payment_processor, is_credit_card_only, is_monetary, is_recur, recur_frequency_unit, is_recur_interval, is_pay_later, pay_later_text, pay_later_receipt, is_allow_other_amount, default_amount_id, min_amount, max_amount, goal_amount, thankyou_title, thankyou_text, thankyou_footer, is_email_receipt, receipt_from_name, receipt_from_email, cc_receipt, bcc_receipt, receipt_text, is_active, footer_text, amount_block_is_active, start_date, end_date, created_id, created_date, currency, campaign_id, is_share, is_confirm_enabled, is_recur_installments, is_partial_payment, min_initial_amount, initial_amount_label, initial_amount_help_text, is_billing_required, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.title, NEW.intro_text, NEW.financial_type_id, NEW.payment_processor, NEW.is_credit_card_only, NEW.is_monetary, NEW.is_recur, NEW.recur_frequency_unit, NEW.is_recur_interval, NEW.is_pay_later, NEW.pay_later_text, NEW.pay_later_receipt, NEW.is_allow_other_amount, NEW.default_amount_id, NEW.min_amount, NEW.max_amount, NEW.goal_amount, NEW.thankyou_title, NEW.thankyou_text, NEW.thankyou_footer, NEW.is_email_receipt, NEW.receipt_from_name, NEW.receipt_from_email, NEW.cc_receipt, NEW.bcc_receipt, NEW.receipt_text, NEW.is_active, NEW.footer_text, NEW.amount_block_is_active, NEW.start_date, NEW.end_date, NEW.created_id, NEW.created_date, NEW.currency, NEW.campaign_id, NEW.is_share, NEW.is_confirm_enabled, NEW.is_recur_installments, NEW.is_partial_payment, NEW.min_initial_amount, NEW.initial_amount_label, NEW.initial_amount_help_text, NEW.is_billing_required, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // +CREATE TRIGGER civicrm_contribution_page_after_insert after insert ON civicrm_contribution_page FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_contribution_page (id, title, intro_text, financial_type_id, payment_processor, is_credit_card_only, is_monetary, is_recur, recur_frequency_unit, is_recur_interval, is_pay_later, pay_later_text, pay_later_receipt, is_allow_other_amount, default_amount_id, min_amount, max_amount, goal_amount, thankyou_title, thankyou_text, thankyou_footer, is_email_receipt, receipt_from_name, receipt_from_email, cc_receipt, bcc_receipt, receipt_text, is_active, footer_text, amount_block_is_active, start_date, end_date, created_id, created_date, currency, campaign_id, is_share, is_confirm_enabled, is_recur_installments, adjust_recur_start_date, is_partial_payment, min_initial_amount, initial_amount_label, initial_amount_help_text, is_billing_required, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.title, NEW.intro_text, NEW.financial_type_id, NEW.payment_processor, NEW.is_credit_card_only, NEW.is_monetary, NEW.is_recur, NEW.recur_frequency_unit, NEW.is_recur_interval, NEW.is_pay_later, NEW.pay_later_text, NEW.pay_later_receipt, NEW.is_allow_other_amount, NEW.default_amount_id, NEW.min_amount, NEW.max_amount, NEW.goal_amount, NEW.thankyou_title, NEW.thankyou_text, NEW.thankyou_footer, NEW.is_email_receipt, NEW.receipt_from_name, NEW.receipt_from_email, NEW.cc_receipt, NEW.bcc_receipt, NEW.receipt_text, NEW.is_active, NEW.footer_text, NEW.amount_block_is_active, NEW.start_date, NEW.end_date, NEW.created_id, NEW.created_date, NEW.currency, NEW.campaign_id, NEW.is_share, NEW.is_confirm_enabled, NEW.is_recur_installments, NEW.adjust_recur_start_date, NEW.is_partial_payment, NEW.min_initial_amount, NEW.initial_amount_label, NEW.initial_amount_help_text, NEW.is_billing_required, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // DELIMITER ; DELIMITER // @@ -3967,7 +3967,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_contribution_page_after_update after update ON civicrm_contribution_page FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.title,'') <> IFNULL(NEW.title,'') OR IFNULL(OLD.intro_text,'') <> IFNULL(NEW.intro_text,'') OR IFNULL(OLD.financial_type_id,'') <> IFNULL(NEW.financial_type_id,'') OR IFNULL(OLD.payment_processor,'') <> IFNULL(NEW.payment_processor,'') OR IFNULL(OLD.is_credit_card_only,'') <> IFNULL(NEW.is_credit_card_only,'') OR IFNULL(OLD.is_monetary,'') <> IFNULL(NEW.is_monetary,'') OR IFNULL(OLD.is_recur,'') <> IFNULL(NEW.is_recur,'') OR IFNULL(OLD.recur_frequency_unit,'') <> IFNULL(NEW.recur_frequency_unit,'') OR IFNULL(OLD.is_recur_interval,'') <> IFNULL(NEW.is_recur_interval,'') OR IFNULL(OLD.is_pay_later,'') <> IFNULL(NEW.is_pay_later,'') OR IFNULL(OLD.pay_later_text,'') <> IFNULL(NEW.pay_later_text,'') OR IFNULL(OLD.pay_later_receipt,'') <> IFNULL(NEW.pay_later_receipt,'') OR IFNULL(OLD.is_allow_other_amount,'') <> IFNULL(NEW.is_allow_other_amount,'') OR IFNULL(OLD.default_amount_id,'') <> IFNULL(NEW.default_amount_id,'') OR IFNULL(OLD.min_amount,'') <> IFNULL(NEW.min_amount,'') OR IFNULL(OLD.max_amount,'') <> IFNULL(NEW.max_amount,'') OR IFNULL(OLD.goal_amount,'') <> IFNULL(NEW.goal_amount,'') OR IFNULL(OLD.thankyou_title,'') <> IFNULL(NEW.thankyou_title,'') OR IFNULL(OLD.thankyou_text,'') <> IFNULL(NEW.thankyou_text,'') OR IFNULL(OLD.thankyou_footer,'') <> IFNULL(NEW.thankyou_footer,'') OR IFNULL(OLD.is_email_receipt,'') <> IFNULL(NEW.is_email_receipt,'') OR IFNULL(OLD.receipt_from_name,'') <> IFNULL(NEW.receipt_from_name,'') OR IFNULL(OLD.receipt_from_email,'') <> IFNULL(NEW.receipt_from_email,'') OR IFNULL(OLD.cc_receipt,'') <> IFNULL(NEW.cc_receipt,'') OR IFNULL(OLD.bcc_receipt,'') <> IFNULL(NEW.bcc_receipt,'') OR IFNULL(OLD.receipt_text,'') <> IFNULL(NEW.receipt_text,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.footer_text,'') <> IFNULL(NEW.footer_text,'') OR IFNULL(OLD.amount_block_is_active,'') <> IFNULL(NEW.amount_block_is_active,'') OR IFNULL(OLD.start_date,'') <> IFNULL(NEW.start_date,'') OR IFNULL(OLD.end_date,'') <> IFNULL(NEW.end_date,'') OR IFNULL(OLD.created_id,'') <> IFNULL(NEW.created_id,'') OR IFNULL(OLD.created_date,'') <> IFNULL(NEW.created_date,'') OR IFNULL(OLD.currency,'') <> IFNULL(NEW.currency,'') OR IFNULL(OLD.campaign_id,'') <> IFNULL(NEW.campaign_id,'') OR IFNULL(OLD.is_share,'') <> IFNULL(NEW.is_share,'') OR IFNULL(OLD.is_confirm_enabled,'') <> IFNULL(NEW.is_confirm_enabled,'') OR IFNULL(OLD.is_recur_installments,'') <> IFNULL(NEW.is_recur_installments,'') OR IFNULL(OLD.is_partial_payment,'') <> IFNULL(NEW.is_partial_payment,'') OR IFNULL(OLD.min_initial_amount,'') <> IFNULL(NEW.min_initial_amount,'') OR IFNULL(OLD.initial_amount_label,'') <> IFNULL(NEW.initial_amount_label,'') OR IFNULL(OLD.initial_amount_help_text,'') <> IFNULL(NEW.initial_amount_help_text,'') OR IFNULL(OLD.is_billing_required,'') <> IFNULL(NEW.is_billing_required,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_contribution_page (id, title, intro_text, financial_type_id, payment_processor, is_credit_card_only, is_monetary, is_recur, recur_frequency_unit, is_recur_interval, is_pay_later, pay_later_text, pay_later_receipt, is_allow_other_amount, default_amount_id, min_amount, max_amount, goal_amount, thankyou_title, thankyou_text, thankyou_footer, is_email_receipt, receipt_from_name, receipt_from_email, cc_receipt, bcc_receipt, receipt_text, is_active, footer_text, amount_block_is_active, start_date, end_date, created_id, created_date, currency, campaign_id, is_share, is_confirm_enabled, is_recur_installments, is_partial_payment, min_initial_amount, initial_amount_label, initial_amount_help_text, is_billing_required, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.title, NEW.intro_text, NEW.financial_type_id, NEW.payment_processor, NEW.is_credit_card_only, NEW.is_monetary, NEW.is_recur, NEW.recur_frequency_unit, NEW.is_recur_interval, NEW.is_pay_later, NEW.pay_later_text, NEW.pay_later_receipt, NEW.is_allow_other_amount, NEW.default_amount_id, NEW.min_amount, NEW.max_amount, NEW.goal_amount, NEW.thankyou_title, NEW.thankyou_text, NEW.thankyou_footer, NEW.is_email_receipt, NEW.receipt_from_name, NEW.receipt_from_email, NEW.cc_receipt, NEW.bcc_receipt, NEW.receipt_text, NEW.is_active, NEW.footer_text, NEW.amount_block_is_active, NEW.start_date, NEW.end_date, NEW.created_id, NEW.created_date, NEW.currency, NEW.campaign_id, NEW.is_share, NEW.is_confirm_enabled, NEW.is_recur_installments, NEW.is_partial_payment, NEW.min_initial_amount, NEW.initial_amount_label, NEW.initial_amount_help_text, NEW.is_billing_required, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // +CREATE TRIGGER civicrm_contribution_page_after_update after update ON civicrm_contribution_page FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.title,'') <> IFNULL(NEW.title,'') OR IFNULL(OLD.intro_text,'') <> IFNULL(NEW.intro_text,'') OR IFNULL(OLD.financial_type_id,'') <> IFNULL(NEW.financial_type_id,'') OR IFNULL(OLD.payment_processor,'') <> IFNULL(NEW.payment_processor,'') OR IFNULL(OLD.is_credit_card_only,'') <> IFNULL(NEW.is_credit_card_only,'') OR IFNULL(OLD.is_monetary,'') <> IFNULL(NEW.is_monetary,'') OR IFNULL(OLD.is_recur,'') <> IFNULL(NEW.is_recur,'') OR IFNULL(OLD.recur_frequency_unit,'') <> IFNULL(NEW.recur_frequency_unit,'') OR IFNULL(OLD.is_recur_interval,'') <> IFNULL(NEW.is_recur_interval,'') OR IFNULL(OLD.is_pay_later,'') <> IFNULL(NEW.is_pay_later,'') OR IFNULL(OLD.pay_later_text,'') <> IFNULL(NEW.pay_later_text,'') OR IFNULL(OLD.pay_later_receipt,'') <> IFNULL(NEW.pay_later_receipt,'') OR IFNULL(OLD.is_allow_other_amount,'') <> IFNULL(NEW.is_allow_other_amount,'') OR IFNULL(OLD.default_amount_id,'') <> IFNULL(NEW.default_amount_id,'') OR IFNULL(OLD.min_amount,'') <> IFNULL(NEW.min_amount,'') OR IFNULL(OLD.max_amount,'') <> IFNULL(NEW.max_amount,'') OR IFNULL(OLD.goal_amount,'') <> IFNULL(NEW.goal_amount,'') OR IFNULL(OLD.thankyou_title,'') <> IFNULL(NEW.thankyou_title,'') OR IFNULL(OLD.thankyou_text,'') <> IFNULL(NEW.thankyou_text,'') OR IFNULL(OLD.thankyou_footer,'') <> IFNULL(NEW.thankyou_footer,'') OR IFNULL(OLD.is_email_receipt,'') <> IFNULL(NEW.is_email_receipt,'') OR IFNULL(OLD.receipt_from_name,'') <> IFNULL(NEW.receipt_from_name,'') OR IFNULL(OLD.receipt_from_email,'') <> IFNULL(NEW.receipt_from_email,'') OR IFNULL(OLD.cc_receipt,'') <> IFNULL(NEW.cc_receipt,'') OR IFNULL(OLD.bcc_receipt,'') <> IFNULL(NEW.bcc_receipt,'') OR IFNULL(OLD.receipt_text,'') <> IFNULL(NEW.receipt_text,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.footer_text,'') <> IFNULL(NEW.footer_text,'') OR IFNULL(OLD.amount_block_is_active,'') <> IFNULL(NEW.amount_block_is_active,'') OR IFNULL(OLD.start_date,'') <> IFNULL(NEW.start_date,'') OR IFNULL(OLD.end_date,'') <> IFNULL(NEW.end_date,'') OR IFNULL(OLD.created_id,'') <> IFNULL(NEW.created_id,'') OR IFNULL(OLD.created_date,'') <> IFNULL(NEW.created_date,'') OR IFNULL(OLD.currency,'') <> IFNULL(NEW.currency,'') OR IFNULL(OLD.campaign_id,'') <> IFNULL(NEW.campaign_id,'') OR IFNULL(OLD.is_share,'') <> IFNULL(NEW.is_share,'') OR IFNULL(OLD.is_confirm_enabled,'') <> IFNULL(NEW.is_confirm_enabled,'') OR IFNULL(OLD.is_recur_installments,'') <> IFNULL(NEW.is_recur_installments,'') OR IFNULL(OLD.adjust_recur_start_date,'') <> IFNULL(NEW.adjust_recur_start_date,'') OR IFNULL(OLD.is_partial_payment,'') <> IFNULL(NEW.is_partial_payment,'') OR IFNULL(OLD.min_initial_amount,'') <> IFNULL(NEW.min_initial_amount,'') OR IFNULL(OLD.initial_amount_label,'') <> IFNULL(NEW.initial_amount_label,'') OR IFNULL(OLD.initial_amount_help_text,'') <> IFNULL(NEW.initial_amount_help_text,'') OR IFNULL(OLD.is_billing_required,'') <> IFNULL(NEW.is_billing_required,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_contribution_page (id, title, intro_text, financial_type_id, payment_processor, is_credit_card_only, is_monetary, is_recur, recur_frequency_unit, is_recur_interval, is_pay_later, pay_later_text, pay_later_receipt, is_allow_other_amount, default_amount_id, min_amount, max_amount, goal_amount, thankyou_title, thankyou_text, thankyou_footer, is_email_receipt, receipt_from_name, receipt_from_email, cc_receipt, bcc_receipt, receipt_text, is_active, footer_text, amount_block_is_active, start_date, end_date, created_id, created_date, currency, campaign_id, is_share, is_confirm_enabled, is_recur_installments, adjust_recur_start_date, is_partial_payment, min_initial_amount, initial_amount_label, initial_amount_help_text, is_billing_required, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.title, NEW.intro_text, NEW.financial_type_id, NEW.payment_processor, NEW.is_credit_card_only, NEW.is_monetary, NEW.is_recur, NEW.recur_frequency_unit, NEW.is_recur_interval, NEW.is_pay_later, NEW.pay_later_text, NEW.pay_later_receipt, NEW.is_allow_other_amount, NEW.default_amount_id, NEW.min_amount, NEW.max_amount, NEW.goal_amount, NEW.thankyou_title, NEW.thankyou_text, NEW.thankyou_footer, NEW.is_email_receipt, NEW.receipt_from_name, NEW.receipt_from_email, NEW.cc_receipt, NEW.bcc_receipt, NEW.receipt_text, NEW.is_active, NEW.footer_text, NEW.amount_block_is_active, NEW.start_date, NEW.end_date, NEW.created_id, NEW.created_date, NEW.currency, NEW.campaign_id, NEW.is_share, NEW.is_confirm_enabled, NEW.is_recur_installments, NEW.adjust_recur_start_date, NEW.is_partial_payment, NEW.min_initial_amount, NEW.initial_amount_label, NEW.initial_amount_help_text, NEW.is_billing_required, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // DELIMITER ; DELIMITER // @@ -3975,7 +3975,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_contribution_page_after_delete after delete ON civicrm_contribution_page FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_contribution_page (id, title, intro_text, financial_type_id, payment_processor, is_credit_card_only, is_monetary, is_recur, recur_frequency_unit, is_recur_interval, is_pay_later, pay_later_text, pay_later_receipt, is_allow_other_amount, default_amount_id, min_amount, max_amount, goal_amount, thankyou_title, thankyou_text, thankyou_footer, is_email_receipt, receipt_from_name, receipt_from_email, cc_receipt, bcc_receipt, receipt_text, is_active, footer_text, amount_block_is_active, start_date, end_date, created_id, created_date, currency, campaign_id, is_share, is_confirm_enabled, is_recur_installments, is_partial_payment, min_initial_amount, initial_amount_label, initial_amount_help_text, is_billing_required, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.title, OLD.intro_text, OLD.financial_type_id, OLD.payment_processor, OLD.is_credit_card_only, OLD.is_monetary, OLD.is_recur, OLD.recur_frequency_unit, OLD.is_recur_interval, OLD.is_pay_later, OLD.pay_later_text, OLD.pay_later_receipt, OLD.is_allow_other_amount, OLD.default_amount_id, OLD.min_amount, OLD.max_amount, OLD.goal_amount, OLD.thankyou_title, OLD.thankyou_text, OLD.thankyou_footer, OLD.is_email_receipt, OLD.receipt_from_name, OLD.receipt_from_email, OLD.cc_receipt, OLD.bcc_receipt, OLD.receipt_text, OLD.is_active, OLD.footer_text, OLD.amount_block_is_active, OLD.start_date, OLD.end_date, OLD.created_id, OLD.created_date, OLD.currency, OLD.campaign_id, OLD.is_share, OLD.is_confirm_enabled, OLD.is_recur_installments, OLD.is_partial_payment, OLD.min_initial_amount, OLD.initial_amount_label, OLD.initial_amount_help_text, OLD.is_billing_required, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // +CREATE TRIGGER civicrm_contribution_page_after_delete after delete ON civicrm_contribution_page FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_contribution_page (id, title, intro_text, financial_type_id, payment_processor, is_credit_card_only, is_monetary, is_recur, recur_frequency_unit, is_recur_interval, is_pay_later, pay_later_text, pay_later_receipt, is_allow_other_amount, default_amount_id, min_amount, max_amount, goal_amount, thankyou_title, thankyou_text, thankyou_footer, is_email_receipt, receipt_from_name, receipt_from_email, cc_receipt, bcc_receipt, receipt_text, is_active, footer_text, amount_block_is_active, start_date, end_date, created_id, created_date, currency, campaign_id, is_share, is_confirm_enabled, is_recur_installments, adjust_recur_start_date, is_partial_payment, min_initial_amount, initial_amount_label, initial_amount_help_text, is_billing_required, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.title, OLD.intro_text, OLD.financial_type_id, OLD.payment_processor, OLD.is_credit_card_only, OLD.is_monetary, OLD.is_recur, OLD.recur_frequency_unit, OLD.is_recur_interval, OLD.is_pay_later, OLD.pay_later_text, OLD.pay_later_receipt, OLD.is_allow_other_amount, OLD.default_amount_id, OLD.min_amount, OLD.max_amount, OLD.goal_amount, OLD.thankyou_title, OLD.thankyou_text, OLD.thankyou_footer, OLD.is_email_receipt, OLD.receipt_from_name, OLD.receipt_from_email, OLD.cc_receipt, OLD.bcc_receipt, OLD.receipt_text, OLD.is_active, OLD.footer_text, OLD.amount_block_is_active, OLD.start_date, OLD.end_date, OLD.created_id, OLD.created_date, OLD.currency, OLD.campaign_id, OLD.is_share, OLD.is_confirm_enabled, OLD.is_recur_installments, OLD.adjust_recur_start_date, OLD.is_partial_payment, OLD.min_initial_amount, OLD.initial_amount_label, OLD.initial_amount_help_text, OLD.is_billing_required, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // DELIMITER ; DELIMITER // @@ -4223,7 +4223,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_dashboard_after_insert after insert ON civicrm_dashboard FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard (id, domain_id, name, label, url, permission, permission_operator, column_no, is_minimized, is_fullscreen, is_active, weight, is_reserved, fullscreen_url, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.domain_id, NEW.name, NEW.label, NEW.url, NEW.permission, NEW.permission_operator, NEW.column_no, NEW.is_minimized, NEW.is_fullscreen, NEW.is_active, NEW.weight, NEW.is_reserved, NEW.fullscreen_url, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // +CREATE TRIGGER civicrm_dashboard_after_insert after insert ON civicrm_dashboard FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard (id, domain_id, name, label, url, permission, permission_operator, is_active, is_reserved, fullscreen_url, cache_minutes, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.domain_id, NEW.name, NEW.label, NEW.url, NEW.permission, NEW.permission_operator, NEW.is_active, NEW.is_reserved, NEW.fullscreen_url, NEW.cache_minutes, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // DELIMITER ; DELIMITER // @@ -4231,7 +4231,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_dashboard_after_update after update ON civicrm_dashboard FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.domain_id,'') <> IFNULL(NEW.domain_id,'') OR IFNULL(OLD.name,'') <> IFNULL(NEW.name,'') OR IFNULL(OLD.label,'') <> IFNULL(NEW.label,'') OR IFNULL(OLD.url,'') <> IFNULL(NEW.url,'') OR IFNULL(OLD.permission,'') <> IFNULL(NEW.permission,'') OR IFNULL(OLD.permission_operator,'') <> IFNULL(NEW.permission_operator,'') OR IFNULL(OLD.column_no,'') <> IFNULL(NEW.column_no,'') OR IFNULL(OLD.is_minimized,'') <> IFNULL(NEW.is_minimized,'') OR IFNULL(OLD.is_fullscreen,'') <> IFNULL(NEW.is_fullscreen,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.weight,'') <> IFNULL(NEW.weight,'') OR IFNULL(OLD.is_reserved,'') <> IFNULL(NEW.is_reserved,'') OR IFNULL(OLD.fullscreen_url,'') <> IFNULL(NEW.fullscreen_url,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_dashboard (id, domain_id, name, label, url, permission, permission_operator, column_no, is_minimized, is_fullscreen, is_active, weight, is_reserved, fullscreen_url, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.domain_id, NEW.name, NEW.label, NEW.url, NEW.permission, NEW.permission_operator, NEW.column_no, NEW.is_minimized, NEW.is_fullscreen, NEW.is_active, NEW.weight, NEW.is_reserved, NEW.fullscreen_url, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // +CREATE TRIGGER civicrm_dashboard_after_update after update ON civicrm_dashboard FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.domain_id,'') <> IFNULL(NEW.domain_id,'') OR IFNULL(OLD.name,'') <> IFNULL(NEW.name,'') OR IFNULL(OLD.label,'') <> IFNULL(NEW.label,'') OR IFNULL(OLD.url,'') <> IFNULL(NEW.url,'') OR IFNULL(OLD.permission,'') <> IFNULL(NEW.permission,'') OR IFNULL(OLD.permission_operator,'') <> IFNULL(NEW.permission_operator,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.is_reserved,'') <> IFNULL(NEW.is_reserved,'') OR IFNULL(OLD.fullscreen_url,'') <> IFNULL(NEW.fullscreen_url,'') OR IFNULL(OLD.cache_minutes,'') <> IFNULL(NEW.cache_minutes,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_dashboard (id, domain_id, name, label, url, permission, permission_operator, is_active, is_reserved, fullscreen_url, cache_minutes, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.domain_id, NEW.name, NEW.label, NEW.url, NEW.permission, NEW.permission_operator, NEW.is_active, NEW.is_reserved, NEW.fullscreen_url, NEW.cache_minutes, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // DELIMITER ; DELIMITER // @@ -4239,7 +4239,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_dashboard_after_delete after delete ON civicrm_dashboard FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard (id, domain_id, name, label, url, permission, permission_operator, column_no, is_minimized, is_fullscreen, is_active, weight, is_reserved, fullscreen_url, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.domain_id, OLD.name, OLD.label, OLD.url, OLD.permission, OLD.permission_operator, OLD.column_no, OLD.is_minimized, OLD.is_fullscreen, OLD.is_active, OLD.weight, OLD.is_reserved, OLD.fullscreen_url, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // +CREATE TRIGGER civicrm_dashboard_after_delete after delete ON civicrm_dashboard FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard (id, domain_id, name, label, url, permission, permission_operator, is_active, is_reserved, fullscreen_url, cache_minutes, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.domain_id, OLD.name, OLD.label, OLD.url, OLD.permission, OLD.permission_operator, OLD.is_active, OLD.is_reserved, OLD.fullscreen_url, OLD.cache_minutes, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // DELIMITER ; DELIMITER // @@ -4247,7 +4247,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_dashboard_contact_after_insert after insert ON civicrm_dashboard_contact FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard_contact (id, dashboard_id, contact_id, column_no, is_minimized, is_fullscreen, is_active, weight, content, created_date, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.dashboard_id, NEW.contact_id, NEW.column_no, NEW.is_minimized, NEW.is_fullscreen, NEW.is_active, NEW.weight, NEW.content, NEW.created_date, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // +CREATE TRIGGER civicrm_dashboard_contact_after_insert after insert ON civicrm_dashboard_contact FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard_contact (id, dashboard_id, contact_id, column_no, is_active, weight, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.dashboard_id, NEW.contact_id, NEW.column_no, NEW.is_active, NEW.weight, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // DELIMITER ; DELIMITER // @@ -4255,7 +4255,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_dashboard_contact_after_update after update ON civicrm_dashboard_contact FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.dashboard_id,'') <> IFNULL(NEW.dashboard_id,'') OR IFNULL(OLD.contact_id,'') <> IFNULL(NEW.contact_id,'') OR IFNULL(OLD.column_no,'') <> IFNULL(NEW.column_no,'') OR IFNULL(OLD.is_minimized,'') <> IFNULL(NEW.is_minimized,'') OR IFNULL(OLD.is_fullscreen,'') <> IFNULL(NEW.is_fullscreen,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.weight,'') <> IFNULL(NEW.weight,'') OR IFNULL(OLD.content,'') <> IFNULL(NEW.content,'') OR IFNULL(OLD.created_date,'') <> IFNULL(NEW.created_date,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_dashboard_contact (id, dashboard_id, contact_id, column_no, is_minimized, is_fullscreen, is_active, weight, content, created_date, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.dashboard_id, NEW.contact_id, NEW.column_no, NEW.is_minimized, NEW.is_fullscreen, NEW.is_active, NEW.weight, NEW.content, NEW.created_date, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // +CREATE TRIGGER civicrm_dashboard_contact_after_update after update ON civicrm_dashboard_contact FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.dashboard_id,'') <> IFNULL(NEW.dashboard_id,'') OR IFNULL(OLD.contact_id,'') <> IFNULL(NEW.contact_id,'') OR IFNULL(OLD.column_no,'') <> IFNULL(NEW.column_no,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.weight,'') <> IFNULL(NEW.weight,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_dashboard_contact (id, dashboard_id, contact_id, column_no, is_active, weight, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.dashboard_id, NEW.contact_id, NEW.column_no, NEW.is_active, NEW.weight, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // DELIMITER ; DELIMITER // @@ -4263,7 +4263,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_dashboard_contact_after_delete after delete ON civicrm_dashboard_contact FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard_contact (id, dashboard_id, contact_id, column_no, is_minimized, is_fullscreen, is_active, weight, content, created_date, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.dashboard_id, OLD.contact_id, OLD.column_no, OLD.is_minimized, OLD.is_fullscreen, OLD.is_active, OLD.weight, OLD.content, OLD.created_date, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // +CREATE TRIGGER civicrm_dashboard_contact_after_delete after delete ON civicrm_dashboard_contact FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_dashboard_contact (id, dashboard_id, contact_id, column_no, is_active, weight, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.dashboard_id, OLD.contact_id, OLD.column_no, OLD.is_active, OLD.weight, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // DELIMITER ; DELIMITER // @@ -5878,7 +5878,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_pledge_block_after_insert after insert ON civicrm_pledge_block FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_pledge_block (id, entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_table, NEW.entity_id, NEW.pledge_frequency_unit, NEW.is_pledge_interval, NEW.max_reminders, NEW.initial_reminder_day, NEW.additional_reminder_day, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // +CREATE TRIGGER civicrm_pledge_block_after_insert after insert ON civicrm_pledge_block FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_pledge_block (id, entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day, pledge_start_date, is_pledge_start_date_visible, is_pledge_start_date_editable, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_table, NEW.entity_id, NEW.pledge_frequency_unit, NEW.is_pledge_interval, NEW.max_reminders, NEW.initial_reminder_day, NEW.additional_reminder_day, NEW.pledge_start_date, NEW.is_pledge_start_date_visible, NEW.is_pledge_start_date_editable, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // DELIMITER ; DELIMITER // @@ -5886,7 +5886,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_pledge_block_after_update after update ON civicrm_pledge_block FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_table,'') <> IFNULL(NEW.entity_table,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.pledge_frequency_unit,'') <> IFNULL(NEW.pledge_frequency_unit,'') OR IFNULL(OLD.is_pledge_interval,'') <> IFNULL(NEW.is_pledge_interval,'') OR IFNULL(OLD.max_reminders,'') <> IFNULL(NEW.max_reminders,'') OR IFNULL(OLD.initial_reminder_day,'') <> IFNULL(NEW.initial_reminder_day,'') OR IFNULL(OLD.additional_reminder_day,'') <> IFNULL(NEW.additional_reminder_day,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_pledge_block (id, entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_table, NEW.entity_id, NEW.pledge_frequency_unit, NEW.is_pledge_interval, NEW.max_reminders, NEW.initial_reminder_day, NEW.additional_reminder_day, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // +CREATE TRIGGER civicrm_pledge_block_after_update after update ON civicrm_pledge_block FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_table,'') <> IFNULL(NEW.entity_table,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.pledge_frequency_unit,'') <> IFNULL(NEW.pledge_frequency_unit,'') OR IFNULL(OLD.is_pledge_interval,'') <> IFNULL(NEW.is_pledge_interval,'') OR IFNULL(OLD.max_reminders,'') <> IFNULL(NEW.max_reminders,'') OR IFNULL(OLD.initial_reminder_day,'') <> IFNULL(NEW.initial_reminder_day,'') OR IFNULL(OLD.additional_reminder_day,'') <> IFNULL(NEW.additional_reminder_day,'') OR IFNULL(OLD.pledge_start_date,'') <> IFNULL(NEW.pledge_start_date,'') OR IFNULL(OLD.is_pledge_start_date_visible,'') <> IFNULL(NEW.is_pledge_start_date_visible,'') OR IFNULL(OLD.is_pledge_start_date_editable,'') <> IFNULL(NEW.is_pledge_start_date_editable,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_pledge_block (id, entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day, pledge_start_date, is_pledge_start_date_visible, is_pledge_start_date_editable, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_table, NEW.entity_id, NEW.pledge_frequency_unit, NEW.is_pledge_interval, NEW.max_reminders, NEW.initial_reminder_day, NEW.additional_reminder_day, NEW.pledge_start_date, NEW.is_pledge_start_date_visible, NEW.is_pledge_start_date_editable, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // DELIMITER ; DELIMITER // @@ -5894,7 +5894,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_pledge_block_after_delete after delete ON civicrm_pledge_block FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_pledge_block (id, entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_table, OLD.entity_id, OLD.pledge_frequency_unit, OLD.is_pledge_interval, OLD.max_reminders, OLD.initial_reminder_day, OLD.additional_reminder_day, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // +CREATE TRIGGER civicrm_pledge_block_after_delete after delete ON civicrm_pledge_block FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_pledge_block (id, entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day, pledge_start_date, is_pledge_start_date_visible, is_pledge_start_date_editable, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_table, OLD.entity_id, OLD.pledge_frequency_unit, OLD.is_pledge_interval, OLD.max_reminders, OLD.initial_reminder_day, OLD.additional_reminder_day, OLD.pledge_start_date, OLD.is_pledge_start_date_visible, OLD.is_pledge_start_date_editable, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // DELIMITER ; DELIMITER // @@ -6022,7 +6022,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_price_field_value_after_insert after insert ON civicrm_price_field_value FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_price_field_value (id, price_field_id, name, label, description, amount, count, max_value, weight, is_default, is_active, membership_type_id, membership_num_terms, deductible_amount, financial_type_id, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.price_field_id, NEW.name, NEW.label, NEW.description, NEW.amount, NEW.count, NEW.max_value, NEW.weight, NEW.is_default, NEW.is_active, NEW.membership_type_id, NEW.membership_num_terms, NEW.deductible_amount, NEW.financial_type_id, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // +CREATE TRIGGER civicrm_price_field_value_after_insert after insert ON civicrm_price_field_value FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_price_field_value (id, price_field_id, name, label, description, amount, count, max_value, weight, is_default, is_active, membership_type_id, membership_num_terms, deductible_amount, financial_type_id, help_pre, help_post, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.price_field_id, NEW.name, NEW.label, NEW.description, NEW.amount, NEW.count, NEW.max_value, NEW.weight, NEW.is_default, NEW.is_active, NEW.membership_type_id, NEW.membership_num_terms, NEW.deductible_amount, NEW.financial_type_id, NEW.help_pre, NEW.help_post, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // DELIMITER ; DELIMITER // @@ -6030,7 +6030,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_price_field_value_after_update after update ON civicrm_price_field_value FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.price_field_id,'') <> IFNULL(NEW.price_field_id,'') OR IFNULL(OLD.name,'') <> IFNULL(NEW.name,'') OR IFNULL(OLD.label,'') <> IFNULL(NEW.label,'') OR IFNULL(OLD.description,'') <> IFNULL(NEW.description,'') OR IFNULL(OLD.amount,'') <> IFNULL(NEW.amount,'') OR IFNULL(OLD.count,'') <> IFNULL(NEW.count,'') OR IFNULL(OLD.max_value,'') <> IFNULL(NEW.max_value,'') OR IFNULL(OLD.weight,'') <> IFNULL(NEW.weight,'') OR IFNULL(OLD.is_default,'') <> IFNULL(NEW.is_default,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.membership_type_id,'') <> IFNULL(NEW.membership_type_id,'') OR IFNULL(OLD.membership_num_terms,'') <> IFNULL(NEW.membership_num_terms,'') OR IFNULL(OLD.deductible_amount,'') <> IFNULL(NEW.deductible_amount,'') OR IFNULL(OLD.financial_type_id,'') <> IFNULL(NEW.financial_type_id,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_price_field_value (id, price_field_id, name, label, description, amount, count, max_value, weight, is_default, is_active, membership_type_id, membership_num_terms, deductible_amount, financial_type_id, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.price_field_id, NEW.name, NEW.label, NEW.description, NEW.amount, NEW.count, NEW.max_value, NEW.weight, NEW.is_default, NEW.is_active, NEW.membership_type_id, NEW.membership_num_terms, NEW.deductible_amount, NEW.financial_type_id, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // +CREATE TRIGGER civicrm_price_field_value_after_update after update ON civicrm_price_field_value FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.price_field_id,'') <> IFNULL(NEW.price_field_id,'') OR IFNULL(OLD.name,'') <> IFNULL(NEW.name,'') OR IFNULL(OLD.label,'') <> IFNULL(NEW.label,'') OR IFNULL(OLD.description,'') <> IFNULL(NEW.description,'') OR IFNULL(OLD.amount,'') <> IFNULL(NEW.amount,'') OR IFNULL(OLD.count,'') <> IFNULL(NEW.count,'') OR IFNULL(OLD.max_value,'') <> IFNULL(NEW.max_value,'') OR IFNULL(OLD.weight,'') <> IFNULL(NEW.weight,'') OR IFNULL(OLD.is_default,'') <> IFNULL(NEW.is_default,'') OR IFNULL(OLD.is_active,'') <> IFNULL(NEW.is_active,'') OR IFNULL(OLD.membership_type_id,'') <> IFNULL(NEW.membership_type_id,'') OR IFNULL(OLD.membership_num_terms,'') <> IFNULL(NEW.membership_num_terms,'') OR IFNULL(OLD.deductible_amount,'') <> IFNULL(NEW.deductible_amount,'') OR IFNULL(OLD.financial_type_id,'') <> IFNULL(NEW.financial_type_id,'') OR IFNULL(OLD.help_pre,'') <> IFNULL(NEW.help_pre,'') OR IFNULL(OLD.help_post,'') <> IFNULL(NEW.help_post,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_price_field_value (id, price_field_id, name, label, description, amount, count, max_value, weight, is_default, is_active, membership_type_id, membership_num_terms, deductible_amount, financial_type_id, help_pre, help_post, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.price_field_id, NEW.name, NEW.label, NEW.description, NEW.amount, NEW.count, NEW.max_value, NEW.weight, NEW.is_default, NEW.is_active, NEW.membership_type_id, NEW.membership_num_terms, NEW.deductible_amount, NEW.financial_type_id, NEW.help_pre, NEW.help_post, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // DELIMITER ; DELIMITER // @@ -6038,7 +6038,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_price_field_value_after_delete after delete ON civicrm_price_field_value FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_price_field_value (id, price_field_id, name, label, description, amount, count, max_value, weight, is_default, is_active, membership_type_id, membership_num_terms, deductible_amount, financial_type_id, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.price_field_id, OLD.name, OLD.label, OLD.description, OLD.amount, OLD.count, OLD.max_value, OLD.weight, OLD.is_default, OLD.is_active, OLD.membership_type_id, OLD.membership_num_terms, OLD.deductible_amount, OLD.financial_type_id, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // +CREATE TRIGGER civicrm_price_field_value_after_delete after delete ON civicrm_price_field_value FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_price_field_value (id, price_field_id, name, label, description, amount, count, max_value, weight, is_default, is_active, membership_type_id, membership_num_terms, deductible_amount, financial_type_id, help_pre, help_post, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.price_field_id, OLD.name, OLD.label, OLD.description, OLD.amount, OLD.count, OLD.max_value, OLD.weight, OLD.is_default, OLD.is_active, OLD.membership_type_id, OLD.membership_num_terms, OLD.deductible_amount, OLD.financial_type_id, OLD.help_pre, OLD.help_post, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // DELIMITER ; DELIMITER // @@ -6708,30 +6708,6 @@ DELIMITER ; DELIMITER // -DROP TRIGGER IF EXISTS civicrm_value_1_note_11_after_insert // -DELIMITER ; - -DELIMITER // -CREATE TRIGGER civicrm_value_1_note_11_after_insert after insert ON civicrm_value_1_note_11 FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_1_note_11 (id, entity_id, donor_comment, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.donor_comment, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; END // -DELIMITER ; - -DELIMITER // -DROP TRIGGER IF EXISTS civicrm_value_1_note_11_after_update // -DELIMITER ; - -DELIMITER // -CREATE TRIGGER civicrm_value_1_note_11_after_update after update ON civicrm_value_1_note_11 FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.donor_comment,'') <> IFNULL(NEW.donor_comment,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_value_1_note_11 (id, entity_id, donor_comment, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_id, NEW.donor_comment, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; END // -DELIMITER ; - -DELIMITER // -DROP TRIGGER IF EXISTS civicrm_value_1_note_11_after_delete // -DELIMITER ; - -DELIMITER // -CREATE TRIGGER civicrm_value_1_note_11_after_delete after delete ON civicrm_value_1_note_11 FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_1_note_11 (id, entity_id, donor_comment, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_id, OLD.donor_comment, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; END // -DELIMITER ; - -DELIMITER // DROP TRIGGER IF EXISTS civicrm_value_1_primary_contact_name_9_after_insert // DELIMITER ; @@ -6760,7 +6736,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_value_1_prospect_5_after_insert after insert ON civicrm_value_1_prospect_5 FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_1_prospect_5 (id, entity_id, reviewed, stage, type, capacity, readiness, stewardship, solicitor, inclination, philanthropic, philanthropic_history_51, biography_66, interests_67, origin_68, on_hold_72, income_range, charitable_contributions_decile, disc_income_decile, voter_party, subject_area_interest, university_affiliation, ask_amount_136, expected_amount_137, likelihood__138, expected_close_date_139, close_date_140, next_step_141, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.reviewed, NEW.stage, NEW.type, NEW.capacity, NEW.readiness, NEW.stewardship, NEW.solicitor, NEW.inclination, NEW.philanthropic, NEW.philanthropic_history_51, NEW.biography_66, NEW.interests_67, NEW.origin_68, NEW.on_hold_72, NEW.income_range, NEW.charitable_contributions_decile, NEW.disc_income_decile, NEW.voter_party, NEW.subject_area_interest, NEW.university_affiliation, NEW.ask_amount_136, NEW.expected_amount_137, NEW.likelihood__138, NEW.expected_close_date_139, NEW.close_date_140, NEW.next_step_141, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; +CREATE TRIGGER civicrm_value_1_prospect_5_after_insert after insert ON civicrm_value_1_prospect_5 FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_1_prospect_5 (id, entity_id, reviewed, stage, type, capacity, readiness, stewardship, solicitor, inclination, philanthropic, philanthropic_history_51, biography_66, interests_67, origin_68, on_hold_72, income_range, charitable_contributions_decile, disc_income_decile, voter_party, subject_area_interest, university_affiliation, ask_amount_136, expected_amount_137, likelihood__138, expected_close_date_139, close_date_140, next_step_141, prior_wmf_giving_143, estimated_net_worth_144, notes_147, board_affiliations_148, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.reviewed, NEW.stage, NEW.type, NEW.capacity, NEW.readiness, NEW.stewardship, NEW.solicitor, NEW.inclination, NEW.philanthropic, NEW.philanthropic_history_51, NEW.biography_66, NEW.interests_67, NEW.origin_68, NEW.on_hold_72, NEW.income_range, NEW.charitable_contributions_decile, NEW.disc_income_decile, NEW.voter_party, NEW.subject_area_interest, NEW.university_affiliation, NEW.ask_amount_136, NEW.expected_amount_137, NEW.likelihood__138, NEW.expected_close_date_139, NEW.close_date_140, NEW.next_step_141, NEW.prior_wmf_giving_143, NEW.estimated_net_worth_144, NEW.notes_147, NEW.board_affiliations_148, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id; END // @@ -6771,7 +6747,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_value_1_prospect_5_after_update after update ON civicrm_value_1_prospect_5 FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.reviewed,'') <> IFNULL(NEW.reviewed,'') OR IFNULL(OLD.stage,'') <> IFNULL(NEW.stage,'') OR IFNULL(OLD.type,'') <> IFNULL(NEW.type,'') OR IFNULL(OLD.capacity,'') <> IFNULL(NEW.capacity,'') OR IFNULL(OLD.readiness,'') <> IFNULL(NEW.readiness,'') OR IFNULL(OLD.stewardship,'') <> IFNULL(NEW.stewardship,'') OR IFNULL(OLD.solicitor,'') <> IFNULL(NEW.solicitor,'') OR IFNULL(OLD.inclination,'') <> IFNULL(NEW.inclination,'') OR IFNULL(OLD.philanthropic,'') <> IFNULL(NEW.philanthropic,'') OR IFNULL(OLD.philanthropic_history_51,'') <> IFNULL(NEW.philanthropic_history_51,'') OR IFNULL(OLD.biography_66,'') <> IFNULL(NEW.biography_66,'') OR IFNULL(OLD.interests_67,'') <> IFNULL(NEW.interests_67,'') OR IFNULL(OLD.origin_68,'') <> IFNULL(NEW.origin_68,'') OR IFNULL(OLD.on_hold_72,'') <> IFNULL(NEW.on_hold_72,'') OR IFNULL(OLD.income_range,'') <> IFNULL(NEW.income_range,'') OR IFNULL(OLD.charitable_contributions_decile,'') <> IFNULL(NEW.charitable_contributions_decile,'') OR IFNULL(OLD.disc_income_decile,'') <> IFNULL(NEW.disc_income_decile,'') OR IFNULL(OLD.voter_party,'') <> IFNULL(NEW.voter_party,'') OR IFNULL(OLD.subject_area_interest,'') <> IFNULL(NEW.subject_area_interest,'') OR IFNULL(OLD.university_affiliation,'') <> IFNULL(NEW.university_affiliation,'') OR IFNULL(OLD.ask_amount_136,'') <> IFNULL(NEW.ask_amount_136,'') OR IFNULL(OLD.expected_amount_137,'') <> IFNULL(NEW.expected_amount_137,'') OR IFNULL(OLD.likelihood__138,'') <> IFNULL(NEW.likelihood__138,'') OR IFNULL(OLD.expected_close_date_139,'') <> IFNULL(NEW.expected_close_date_139,'') OR IFNULL(OLD.close_date_140,'') <> IFNULL(NEW.close_date_140,'') OR IFNULL(OLD.next_step_141,'') <> IFNULL(NEW.next_step_141,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_value_1_prospect_5 (id, entity_id, reviewed, stage, type, capacity, readiness, stewardship, solicitor, inclination, philanthropic, philanthropic_history_51, biography_66, interests_67, origin_68, on_hold_72, income_range, charitable_contributions_decile, disc_income_decile, voter_party, subject_area_interest, university_affiliation, ask_amount_136, expected_amount_137, likelihood__138, expected_close_date_139, close_date_140, next_step_141, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_id, NEW.reviewed, NEW.stage, NEW.type, NEW.capacity, NEW.readiness, NEW.stewardship, NEW.solicitor, NEW.inclination, NEW.philanthropic, NEW.philanthropic_history_51, NEW.biography_66, NEW.interests_67, NEW.origin_68, NEW.on_hold_72, NEW.income_range, NEW.charitable_contributions_decile, NEW.disc_income_decile, NEW.voter_party, NEW.subject_area_interest, NEW.university_affiliation, NEW.ask_amount_136, NEW.expected_amount_137, NEW.likelihood__138, NEW.expected_close_date_139, NEW.close_date_140, NEW.next_step_141, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; +CREATE TRIGGER civicrm_value_1_prospect_5_after_update after update ON civicrm_value_1_prospect_5 FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.reviewed,'') <> IFNULL(NEW.reviewed,'') OR IFNULL(OLD.stage,'') <> IFNULL(NEW.stage,'') OR IFNULL(OLD.type,'') <> IFNULL(NEW.type,'') OR IFNULL(OLD.capacity,'') <> IFNULL(NEW.capacity,'') OR IFNULL(OLD.readiness,'') <> IFNULL(NEW.readiness,'') OR IFNULL(OLD.stewardship,'') <> IFNULL(NEW.stewardship,'') OR IFNULL(OLD.solicitor,'') <> IFNULL(NEW.solicitor,'') OR IFNULL(OLD.inclination,'') <> IFNULL(NEW.inclination,'') OR IFNULL(OLD.philanthropic,'') <> IFNULL(NEW.philanthropic,'') OR IFNULL(OLD.philanthropic_history_51,'') <> IFNULL(NEW.philanthropic_history_51,'') OR IFNULL(OLD.biography_66,'') <> IFNULL(NEW.biography_66,'') OR IFNULL(OLD.interests_67,'') <> IFNULL(NEW.interests_67,'') OR IFNULL(OLD.origin_68,'') <> IFNULL(NEW.origin_68,'') OR IFNULL(OLD.on_hold_72,'') <> IFNULL(NEW.on_hold_72,'') OR IFNULL(OLD.income_range,'') <> IFNULL(NEW.income_range,'') OR IFNULL(OLD.charitable_contributions_decile,'') <> IFNULL(NEW.charitable_contributions_decile,'') OR IFNULL(OLD.disc_income_decile,'') <> IFNULL(NEW.disc_income_decile,'') OR IFNULL(OLD.voter_party,'') <> IFNULL(NEW.voter_party,'') OR IFNULL(OLD.subject_area_interest,'') <> IFNULL(NEW.subject_area_interest,'') OR IFNULL(OLD.university_affiliation,'') <> IFNULL(NEW.university_affiliation,'') OR IFNULL(OLD.ask_amount_136,'') <> IFNULL(NEW.ask_amount_136,'') OR IFNULL(OLD.expected_amount_137,'') <> IFNULL(NEW.expected_amount_137,'') OR IFNULL(OLD.likelihood__138,'') <> IFNULL(NEW.likelihood__138,'') OR IFNULL(OLD.expected_close_date_139,'') <> IFNULL(NEW.expected_close_date_139,'') OR IFNULL(OLD.close_date_140,'') <> IFNULL(NEW.close_date_140,'') OR IFNULL(OLD.next_step_141,'') <> IFNULL(NEW.next_step_141,'') OR IFNULL(OLD.prior_wmf_giving_143,'') <> IFNULL(NEW.prior_wmf_giving_143,'') OR IFNULL(OLD.estimated_net_worth_144,'') <> IFNULL(NEW.estimated_net_worth_144,'') OR IFNULL(OLD.notes_147,'') <> IFNULL(NEW.notes_147,'') OR IFNULL(OLD.board_affiliations_148,'') <> IFNULL(NEW.board_affiliations_148,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_value_1_prospect_5 (id, entity_id, reviewed, stage, type, capacity, readiness, stewardship, solicitor, inclination, philanthropic, philanthropic_history_51, biography_66, interests_67, origin_68, on_hold_72, income_range, charitable_contributions_decile, disc_income_decile, voter_party, subject_area_interest, university_affiliation, ask_amount_136, expected_amount_137, likelihood__138, expected_close_date_139, close_date_140, next_step_141, prior_wmf_giving_143, estimated_net_worth_144, notes_147, board_affiliations_148, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_id, NEW.reviewed, NEW.stage, NEW.type, NEW.capacity, NEW.readiness, NEW.stewardship, NEW.solicitor, NEW.inclination, NEW.philanthropic, NEW.philanthropic_history_51, NEW.biography_66, NEW.interests_67, NEW.origin_68, NEW.on_hold_72, NEW.income_range, NEW.charitable_contributions_decile, NEW.disc_income_decile, NEW.voter_party, NEW.subject_area_interest, NEW.university_affiliation, NEW.ask_amount_136, NEW.expected_amount_137, NEW.likelihood__138, NEW.expected_close_date_139, NEW.close_date_140, NEW.next_step_141, NEW.prior_wmf_giving_143, NEW.estimated_net_worth_144, NEW.notes_147, NEW.board_affiliations_148, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id; END // @@ -6782,7 +6758,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_value_1_prospect_5_after_delete after delete ON civicrm_value_1_prospect_5 FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_1_prospect_5 (id, entity_id, reviewed, stage, type, capacity, readiness, stewardship, solicitor, inclination, philanthropic, philanthropic_history_51, biography_66, interests_67, origin_68, on_hold_72, income_range, charitable_contributions_decile, disc_income_decile, voter_party, subject_area_interest, university_affiliation, ask_amount_136, expected_amount_137, likelihood__138, expected_close_date_139, close_date_140, next_step_141, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_id, OLD.reviewed, OLD.stage, OLD.type, OLD.capacity, OLD.readiness, OLD.stewardship, OLD.solicitor, OLD.inclination, OLD.philanthropic, OLD.philanthropic_history_51, OLD.biography_66, OLD.interests_67, OLD.origin_68, OLD.on_hold_72, OLD.income_range, OLD.charitable_contributions_decile, OLD.disc_income_decile, OLD.voter_party, OLD.subject_area_interest, OLD.university_affiliation, OLD.ask_amount_136, OLD.expected_amount_137, OLD.likelihood__138, OLD.expected_close_date_139, OLD.close_date_140, OLD.next_step_141, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; +CREATE TRIGGER civicrm_value_1_prospect_5_after_delete after delete ON civicrm_value_1_prospect_5 FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_1_prospect_5 (id, entity_id, reviewed, stage, type, capacity, readiness, stewardship, solicitor, inclination, philanthropic, philanthropic_history_51, biography_66, interests_67, origin_68, on_hold_72, income_range, charitable_contributions_decile, disc_income_decile, voter_party, subject_area_interest, university_affiliation, ask_amount_136, expected_amount_137, likelihood__138, expected_close_date_139, close_date_140, next_step_141, prior_wmf_giving_143, estimated_net_worth_144, notes_147, board_affiliations_148, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_id, OLD.reviewed, OLD.stage, OLD.type, OLD.capacity, OLD.readiness, OLD.stewardship, OLD.solicitor, OLD.inclination, OLD.philanthropic, OLD.philanthropic_history_51, OLD.biography_66, OLD.interests_67, OLD.origin_68, OLD.on_hold_72, OLD.income_range, OLD.charitable_contributions_decile, OLD.disc_income_decile, OLD.voter_party, OLD.subject_area_interest, OLD.university_affiliation, OLD.ask_amount_136, OLD.expected_amount_137, OLD.likelihood__138, OLD.expected_close_date_139, OLD.close_date_140, OLD.next_step_141, OLD.prior_wmf_giving_143, OLD.estimated_net_worth_144, OLD.notes_147, OLD.board_affiliations_148, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = OLD.entity_id; END // @@ -6865,7 +6841,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_value_anonymous__after_insert after insert ON civicrm_value_anonymous_ FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_anonymous_ (id, entity_id, listed_as_anonymous, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.listed_as_anonymous, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; +CREATE TRIGGER civicrm_value_anonymous__after_insert after insert ON civicrm_value_anonymous_ FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_anonymous_ (id, entity_id, listed_as_anonymous, listed_on_benefactor_page_as_142, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.listed_as_anonymous, NEW.listed_on_benefactor_page_as_142, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'insert'); END IF; UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id; END // @@ -6876,7 +6852,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_value_anonymous__after_update after update ON civicrm_value_anonymous_ FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.listed_as_anonymous,'') <> IFNULL(NEW.listed_as_anonymous,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_value_anonymous_ (id, entity_id, listed_as_anonymous, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_id, NEW.listed_as_anonymous, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; +CREATE TRIGGER civicrm_value_anonymous__after_update after update ON civicrm_value_anonymous_ FOR EACH ROW BEGIN IF ( (IFNULL(OLD.id,'') <> IFNULL(NEW.id,'') OR IFNULL(OLD.entity_id,'') <> IFNULL(NEW.entity_id,'') OR IFNULL(OLD.listed_as_anonymous,'') <> IFNULL(NEW.listed_as_anonymous,'') OR IFNULL(OLD.listed_on_benefactor_page_as_142,'') <> IFNULL(NEW.listed_on_benefactor_page_as_142,'')) AND ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) ) THEN INSERT INTO log_civicrm_value_anonymous_ (id, entity_id, listed_as_anonymous, listed_on_benefactor_page_as_142, log_conn_id, log_user_id, log_action) VALUES (NEW.id, NEW.entity_id, NEW.listed_as_anonymous, NEW.listed_on_benefactor_page_as_142, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'update'); END IF; UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id; END // @@ -6887,7 +6863,7 @@ DELIMITER ; DELIMITER // -CREATE TRIGGER civicrm_value_anonymous__after_delete after delete ON civicrm_value_anonymous_ FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_anonymous_ (id, entity_id, listed_as_anonymous, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_id, OLD.listed_as_anonymous, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; +CREATE TRIGGER civicrm_value_anonymous__after_delete after delete ON civicrm_value_anonymous_ FOR EACH ROW BEGIN IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_anonymous_ (id, entity_id, listed_as_anonymous, listed_on_benefactor_page_as_142, log_conn_id, log_user_id, log_action) VALUES ( OLD.id, OLD.entity_id, OLD.listed_as_anonymous, OLD.listed_on_benefactor_page_as_142, COALESCE(@uniqueID, LEFT(CONCAT('c_', unix_timestamp()/3600, CONNECTION_ID()), 17)), @civicrm_user_id, 'delete'); END IF; UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = OLD.entity_id; END // -- To view, visit https://gerrit.wikimedia.org/r/318041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8714fbcfbc3375e5bd4237c311fd826a23b63efb Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits