update:更新表结构

This commit is contained in:
JaguarJack 2020-08-30 11:31:25 +08:00
parent 202f7f1dea
commit 1d660ba648

View File

@ -31,17 +31,12 @@ class UpdatePermissions extends Migrator
if ($this->hasTable('permissions')) { if ($this->hasTable('permissions')) {
$table = $this->table('permissions'); $table = $this->table('permissions');
$table->renameColumn('method', 'hidden_children_in_menu') $table->renameColumn('method', 'hidden_children_in_menu', 'status')
->addColumn('breadcrumb', 'integer', [ ->addColumn('hidden', 'integer', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
'default' => 1, 'default' => 1,
'comment' => '是否显示在面包屑 1 显示 2 隐藏', 'comment' => '是否在侧边栏隐藏 1 显示 2 隐藏',
'after' => 'redirect']) 'after' => 'redirect'])
->addColumn('affix', 'integer', [
'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
'default' => 2,
'comment' => '是否固定在 tag-view 1 固定 2 不固定',
'after' => 'breadcrumb'])
->update(); ->update();
} }
} }