adding example apps, fixing powerup issues
[feisty_meow.git] / production / example_apps / zippy_maps / config / Migrations / 20170525190322_drop_parent_from_categories.php
1 <?php
2 use Phinx\Migration\AbstractMigration;
3 class DropParentFromCategories extends AbstractMigration {
4         /**
5          * Change Method.
6          *
7          * Write your reversible migrations using this method.
8          *
9          * More information on writing migrations is available here:
10          * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
11          *
12          * The following commands can be used in this method and Phinx will
13          * automatically reverse them when rolling back:
14          *
15          * createTable
16          * renameTable
17          * addColumn
18          * renameColumn
19          * addIndex
20          * addForeignKey
21          *
22          * Remember to call "create()" or "update()" and NOT "save()" when working
23          * with the Table class.
24          */
25         // public function change()
26         // {
27         // }
28         
29         public function up() {
30                 $this->table ( 'categories' )->removeColumn ( 'parent' )->update ();
31         }
32         
33         public function down() {
34                 $this->table ( 'categories' )->addColumn ( 'parent', 'integer', [ 
35                                 'signed' => false 
36                 ] )->update ();
37         }
38 }