mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 完善数据迁移脚本
This commit is contained in:
parent
3cb72a2647
commit
40ca0ac3bf
@ -26,7 +26,7 @@ class AddAdminListField extends Migrator {
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up() {
|
||||
$this->table('admin_list')->addColumn('hash_type', 'string', [
|
||||
$this->table('admin_list')->addColumn('hash_type', 'integer', [
|
||||
'limit' => MysqlAdapter::INT_TINY,
|
||||
'default' => 2,
|
||||
'comment' => '是否采用hash映射, 1:普通模式 2:加密模式'
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use Phinx\Db\Adapter\MysqlAdapter;
|
||||
|
||||
class ChangeAdminMenuField extends Migrator {
|
||||
/**
|
||||
@ -25,7 +26,13 @@ class ChangeAdminMenuField extends Migrator {
|
||||
* with the Table class.
|
||||
*/
|
||||
public function up() {
|
||||
$this->table('admin_menu')->renameColumn('name', 'title')->update();
|
||||
$this->table('admin_menu')
|
||||
->renameColumn('name', 'title')
|
||||
->changeColumn('level', 'integer', [
|
||||
'limit' => MysqlAdapter::INT_TINY,
|
||||
'default' => 0,
|
||||
'comment' => '菜单层级,1-一级菜单,2-二级菜单,3-按钮'
|
||||
])->update();
|
||||
}
|
||||
|
||||
public function down() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user