2 use Phinx\Migration\AbstractMigration;
3 class DropParentFromCategories extends AbstractMigration {
7 * Write your reversible migrations using this method.
9 * More information on writing migrations is available here:
10 * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
12 * The following commands can be used in this method and Phinx will
13 * automatically reverse them when rolling back:
22 * Remember to call "create()" or "update()" and NOT "save()" when working
23 * with the Table class.
25 // public function change()
29 public function up() {
30 $this->table ( 'categories' )->removeColumn ( 'parent' )->update ();
33 public function down() {
34 $this->table ( 'categories' )->addColumn ( 'parent', 'integer', [