7 use Phinx\Migration\AbstractMigration;
13 public function up() {
16 $tableName =
"cuadminprogs";
17 if ($this->hasTable($tableName)) {
18 $sql =
"update $tableName 19 set description = 'Allow the user to access the ACH screens but not do anything.', displaytext = 'ACH Basic' 20 where program = 'aACH'";
23 $sql =
"insert into $tableName (program, displaytext, description, sort_order, def_set) 24 values ('aACHAdv', 'ACH Advanced', 'Allow the user to create/modify ACH files.', 65, 0)";
27 $sql =
"update $tableName 29 where program = 'AdmDeposits'";
34 $tableName =
"cuadminallow";
35 if ($this->hasTable($tableName)) {
36 $sql =
"insert into $tableName (cu, user_name, program) 37 select aa.cu, aa.user_name, 'aACHAdv' 39 where aa.program = 'aACH'";
45 public function down() {
48 $tableName =
"cuadminprogs";
49 if ($this->hasTable($tableName)) {
50 $sql =
"update $tableName 51 set description = 'Allow the user to report and export user ACH transaction requests.', displaytext = 'ACH Export' 52 where program = 'aACH'";
55 $sql =
"delete from $tableName where program = 'aACHAdv'";
58 $sql =
"update $tableName 60 where program = 'AdmDeposits'";
65 $tableName =
"cuadminallow";
66 if ($this->hasTable($tableName)) {
67 $sql =
"delete from $tableName where program = 'aACHAdv'";