mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-08-29 20:29:47 +08:00
modified 完善数据迁移脚本
This commit is contained in:
parent
40ca0ac3bf
commit
5804e919bb
@ -27,16 +27,17 @@ class ChangeAdminMenuField extends Migrator {
|
|||||||
*/
|
*/
|
||||||
public function up() {
|
public function up() {
|
||||||
$this->table('admin_menu')
|
$this->table('admin_menu')
|
||||||
|
->removeColumn('hide')
|
||||||
->renameColumn('name', 'title')
|
->renameColumn('name', 'title')
|
||||||
->changeColumn('level', 'integer', [
|
->changeColumn('level', 'integer', [
|
||||||
'limit' => MysqlAdapter::INT_TINY,
|
'limit' => MysqlAdapter::INT_TINY,
|
||||||
'default' => 0,
|
'default' => 1,
|
||||||
'comment' => '菜单层级,1-一级菜单,2-二级菜单,3-按钮'
|
'comment' => '菜单层级,1-一级菜单,2-二级菜单,3-按钮'
|
||||||
|
])->addColumn('show', 'integer', [
|
||||||
|
'limit' => MysqlAdapter::INT_TINY,
|
||||||
|
'default' => 1,
|
||||||
|
'comment' => '是否显示,1-显示,0-隐藏'
|
||||||
])->update();
|
])->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down() {
|
|
||||||
$this->table('admin_menu')->renameColumn('title', 'name')->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user