diff --git a/database/migrations/20241228093758_create_sys_menu.php b/database/migrations/20241228093758_create_sys_menu.php new file mode 100644 index 00000000..be08bd8b --- /dev/null +++ b/database/migrations/20241228093758_create_sys_menu.php @@ -0,0 +1,41 @@ +table('sys_menu', ['engine' => 'MyISAM', 'comment' => '系统菜单表']); + $table->addColumn('pid', 'integer', ['null' => false, 'default' => 0, 'comment' => '父级ID']) + ->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '菜单名称']) + ->addColumn('url', 'string', ['limit' => 128, 'null' => false, 'comment' => '菜单URL']) + ->addColumn('icon', 'string', ['limit' => 64, 'null' => false, 'comment' => '菜单图标']) + ->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '菜单排序']) + ->addColumn('status', 'boolean', ['null' => false, 'default' => 1, 'comment' => '-1为禁用, 1为启用']) + ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) + ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 'comment' => '更新时间']) + ->create(); + } +}