table('extension_auth_permission', [ 'engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '权限表', ]); $table ->addColumn('name', 'string', [ 'limit' => 255, 'default' => '', 'comment' => '权限名称', ]) ->addColumn('rule', 'string', [ 'limit' => 50, 'default' => '', 'comment' => '权限规则', ]) ->addColumn('route', 'string', [ 'limit' => 255, 'default' => '', 'comment' => '权限路由', ]) ->addColumn('method', 'string', [ 'limit' => 50, 'default' => '', 'comment' => '权限方法', ]) ->addColumn('description', 'string', [ 'limit' => 255, 'default' => '', 'comment' => '权限描述', ]) ->addTimestamps() ->addIndex('route', ['unique' => true, 'name' => 'uniq_route']) ->create(); } }