8 use Phinx\Migration\AbstractMigration;
11 public function up() {
13 $cuList = $this->fetchAll(
'SELECT cu FROM cuadmin');
14 $columnName =
"cachedmenu";
16 foreach ($cuList as $cuRow) {
17 $cu = strtolower(trim($cuRow[
"cu"]));
20 $tableName =
"{$cu}user";
22 if ($this->hasTable($tableName)) {
23 $table = $this->table( $tableName );
25 $hasColumn = $table->hasColumn($columnName);
30 print
"Upgrade {$tableName}.\n";
33 $this->query(
"alter table $tableName add column $columnName varchar");
40 public function down() {