/**
  @file
  @brief migration script to move from v7.0 to v7.6 of data controller

  OPTIONAL CHANGE - upload additional data as placeholders for modifying the
  default email message

**/

%let dclib=YOURDCLIB;

libname &dclib "/YOUR/DATACONTROLLER/LIBRARY/PATH";

proc sql;
insert into &dclib..mpe_config set
    tx_from=%sysfunc(datetime())
    ,tx_to='31DEC9999:23:59:59'dt
    ,var_scope="DC_EMAIL"
    ,var_name="SUBMITTED_TEMPLATE"
    ,var_value='Dear user,'!!'0A'x!!'Please be advised that a change to table'
      !!' &alert_lib..&alert_ds has been proposed by &from_user on the '
      !!'&syshostname SAS server.'!!'0A'x!!'Reason provided: '
      !!'%superq(SUBMITTED_TXT)'
      !!'0A'x!!'This is an automated email by Data Controller for SAS. For '
      !!'documentation, please visit https://docs.datacontroller.io'
    ,var_active=1
    ,var_desc='Template email, sent after submitting a change';
insert into &dclib..mpe_config set
    tx_from=%sysfunc(datetime())
    ,tx_to='31DEC9999:23:59:59'dt
    ,var_scope="DC_EMAIL"
    ,var_name="APPROVED_TEMPLATE"
    ,var_value='Dear user,'!!'0A'x!!'Please be advised that a change to table'
      !!' &alert_lib..&alert_ds has been approved by &from_user on the '
      !!'&syshostname SAS server.'!!'0A'x!!'This is an automated email by Data'
      !!' Controller for SAS. For documentation, please visit '
      !!'https://docs.datacontroller.io'
    ,var_active=1
    ,var_desc='Template email, sent after approving a change';
insert into &dclib..mpe_config set
    tx_from=%sysfunc(datetime())
    ,tx_to='31DEC9999:23:59:59'dt
    ,var_scope="DC_EMAIL"
    ,var_name="REJECTED_TEMPLATE"
    ,var_value='Dear user,'!!'0A'x!!'Please be advised that a change to table'
      !!' &alert_lib..&alert_ds has been rejected by &from_user on the '
      !!'&syshostname SAS server.'!!'0A'x!!'Reason provided: '
      !!'%superq(REVIEW_REASON_TXT)'
      !!'0A'x!!'This is an automated email by Data Controller for SAS. For '
      !!'documentation, please visit https://docs.datacontroller.io'
    ,var_active=1
    ,var_desc='Template email, sent after rejecting a change';
