8 use Phinx\Migration\AbstractMigration;
11 public function up() {
12 $tableName =
"cuprodlist";
14 "HBBatch" =>
"Batch Home Banking",
15 "HBLive" =>
"Live Home Banking",
16 "UpgradeBL" =>
"Batch to Live HB Upgrade",
18 "SSL" =>
"SSL Hosting",
19 "SecForm" =>
"Secure Forms",
20 "Gold" =>
"Gold Package ",
21 "Platinum" =>
"Platinum Package ",
22 "Silver" =>
"Silver Package",
23 "ODYUP" =>
"Odyssey Upgrade",
24 "A2A" =>
"Account to Account EFT",
25 "M2M" =>
"Member to Member" 28 if ($this->hasTable($tableName)) {
29 foreach ($productList as $key => $value) {
31 $prodRow = $this->fetchRow(
"SELECT COUNT(*) as count FROM cuprodlist WHERE trim(home_cu_code) = '$key';");
33 if ($prodRow[
'count'] == 0) {
34 $this->query(
"INSERT INTO $tableName (home_cu_code, home_cu_desc) VALUES ('$key', '$value')");
40 public function down() {