refactor: 修改菜单表结构

This commit is contained in:
2025-02-28 13:42:13 +08:00
parent ae08b07e33
commit 0420dc4eec

View File

@@ -27,7 +27,7 @@ class CreateSysMenu extends Migrator
*/ */
public function change() public function change()
{ {
$table = $this->table('sys_menu', ['engine' => 'MyISAM', 'comment' => '系统菜单表']); $table = $this->table('sys_menu', ['engine' => 'InnoDB', 'comment' => '系统菜单表']);
$table->addColumn('pid', 'integer', ['null' => false, 'default' => 0, 'comment' => '父级ID']) $table->addColumn('pid', 'integer', ['null' => false, 'default' => 0, 'comment' => '父级ID'])
->addColumn('title', 'string', ['limit' => 64, 'null' => false, 'comment' => '菜单标题']) ->addColumn('title', 'string', ['limit' => 64, 'null' => false, 'comment' => '菜单标题'])
->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '菜单名称']) ->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '菜单名称'])