Просмотр файла upgrade/migrations/20161215212347_change_fields_in_notice.php
<?php
use Phinx\Migration\AbstractMigration;
class ChangeFieldsInNotice extends AbstractMigration
{
/**
* Migrate Up.
*/
public function up()
{
$users = $this->table('notice');
$users
->changeColumn('text', 'text', ['null' => true])
->changeColumn('user', 'string', ['limit' => 20, 'null' => true])
->changeColumn('time', 'integer')
->changeColumn('protect', 'boolean', ['default' => 0])
->save();
}
/**
* Migrate Down.
*/
public function down()
{
}
}