fixed bug
This commit is contained in:
parent
b3682b1ee6
commit
e7295fa767
@ -28,12 +28,14 @@ class ChangePermissions extends Migrator
|
|||||||
*/
|
*/
|
||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
$table = $this->table('permissions');
|
if ($this->hasTable('permissions')) {
|
||||||
|
$table = $this->table('permissions');
|
||||||
|
|
||||||
$table->addColumn('component', 'string', ['default' => '', 'comment' => '组件名称', 'limit' => '255', 'after' => 'permission_mark'])
|
$table->addColumn('component', 'string', ['default' => '', 'comment' => '组件名称', 'limit' => '255', 'after' => 'permission_mark'])
|
||||||
->addColumn('redirect', 'string', ['default' => '', 'comment' => '跳转地址', 'limit' => '255', 'after' => 'component'])
|
->addColumn('redirect', 'string', ['default' => '', 'comment' => '跳转地址', 'limit' => '255', 'after' => 'component'])
|
||||||
->addColumn('hide_children_in_menu', 'integer', ['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,'default'=> 1,'comment'=>'1 显示 2隐藏', 'after' => 'redirect'])
|
->addColumn('hide_children_in_menu', 'integer', ['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, 'default' => 1, 'comment' => '1 显示 2隐藏', 'after' => 'redirect'])
|
||||||
->addColumn('keep_alive', 'integer', ['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,'default'=> 1,'comment'=>'1 缓存 2 不存在 ', 'after' => 'hide_children_in_menu'])
|
->addColumn('keep_alive', 'integer', ['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, 'default' => 1, 'comment' => '1 缓存 2 不存在 ', 'after' => 'hide_children_in_menu'])
|
||||||
->update();
|
->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,11 @@ class PermissionsAddColumn extends Migrator
|
|||||||
*/
|
*/
|
||||||
public function change()
|
public function change()
|
||||||
{
|
{
|
||||||
$table = $this->table('permissions');
|
if ($this->hasTable('permissions')) {
|
||||||
|
$table = $this->table('permissions');
|
||||||
|
|
||||||
$table->addColumn('level', 'string', ['default' => '', 'comment' => '层级', 'limit' => '50', 'after' => 'parent_id'])
|
$table->addColumn('level', 'string', ['default' => '', 'comment' => '层级', 'limit' => '50', 'after' => 'parent_id'])
|
||||||
->update();
|
->update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user