Odyssey
2019041500_lnappuser_passwd.php
1 <?php
2 /* Notes:
3  * 1. Anything complicated needs to be done with SQL.
4  * 2. Always have a check to know if the migration needs to occur (up or down).
5  * 3. Use up() and down(), not change(), because of the SQL
6  */
7 use Phinx\Migration\AbstractMigration;
8 
9 /*
10  * Expanding checknumber column to 15 characters
11  */
12 class LnappuserPasswd extends AbstractMigration {
13  public function up() {
14 
15  /*
16  * increase lnappuser->pwd to 255 varchar
17  */
18  $lnappTableName = "lnappuser";
19  if ($this->hasTable($lnappTableName)) {
20  $lnappTable = $this->table($lnappTableName);
21  $lnappTable->changeColumn('pwd', 'string', ['null' => true, 'limit' => 255])->save();
22  }
23 
24  }
25 
26  public function down() {
27  }
28 }