diff --git a/db_scripts/diff/15231.down b/db_scripts/diff/15231.down new file mode 100644 index 00000000..6e2025e0 --- /dev/null +++ b/db_scripts/diff/15231.down @@ -0,0 +1,16 @@ +use billing; +set autocommit=0; + +DELETE from email_templates + WHERE reseller_id IS NULL + AND name = 'credit_warning_default_email'; + +DELETE from email_templates + WHERE reseller_id IS NULL + AND name = 'customer_fraud_lock_default_email'; + +DELETE from email_templates + WHERE reseller_id IS NULL + AND name = 'customer_fraud_warning_default_email'; + +commit; diff --git a/db_scripts/diff/15231.up b/db_scripts/diff/15231.up new file mode 100644 index 00000000..69037bac --- /dev/null +++ b/db_scripts/diff/15231.up @@ -0,0 +1,50 @@ +use billing; +set autocommit=0; + +INSERT INTO email_templates (reseller_id, name, from_email, subject, body) +VALUES +(NULL, 'credit_warning_default_email', '[% adminmail %]', +'Sipwise NGCP credit threshold notification', +'Credit threshold warning for: [% domain %] +The following contracts are below the configured threshold of [% threshold %]: + +[% contracts %] + +Your faithful Sipwise system + +-- +This is an automatically generated message. Do not reply.'); + +INSERT INTO email_templates (reseller_id, name, from_email, subject, body) +VALUES +(NULL, 'customer_fraud_lock_default_email', '[% adminmail %]', +'Customer # [% customer_id %] locked by fraud detection', +'Customer # [% customer_id %] has been locked due to exceeding the configured +credit balance threshold ([% interval_cost %] >= [% interval_limit %]) in the [% type %] settings. + +Affected subscribers: +[% subscribers %] + +Your faithful Sipwise system + +-- +This is an automatically generated message. Do not reply.'); + +INSERT INTO email_templates (reseller_id, name, from_email, subject, body) +VALUES +(NULL, 'customer_fraud_warning_default_email', '[% adminmail %]', +'Customer # [% customer_id %] exceeding fraud detection limit', +'Customer # [% customer_id %] is currently exceeding the configured credit balance +threshold ([% interval_cost %] >= [% interval_limit %]) in the [% type %] settings, +but has not been locked due to configuration. + +Affected subscribers: +[% subscribers %] + +Your faithful Sipwise system + +-- +This is an automatically generated message. Do not reply.'); + +commit; +