首页 生活随笔

把Nextcloud升级到了20.0.2 RC1,安全检查时显示missing some primary keys.
[redbar]关于您的设置有一些警告。
The database is missing some primary keys. Due to the fact that adding primary keys on big tables could take some time they were not added automatically. By running "occ db:add-missing-primary-keys" those missing primary keys could be added manually while the instance keeps running.
Missing primary key on table "oc_federated_reshares".
Missing primary key on table "oc_systemtag_object_mapping".
Missing primary key on table "oc_comments_read_markers".
Missing primary key on table "oc_collres_resources".
Missing primary key on table "oc_collres_accesscache".
Missing primary key on table "oc_filecache_extended".[/redbar]
打开Protainer,连到Nextcloud的bash,然后输入命令修复
[bluebar]sudo -u abc php /config/www/nextcloud/occ db:add-missing-primary-keys[/bluebar]
QQ截图20201114180736.png
报错
QQ截图20201114180844.png
没有定义这个命令,
去Github上看了下,是个BUG
[btnblue href="https://github.com/nextcloud/server/pull/24085" target="blank"]查看BUG详情[/btnblue]
QQ截图20201115183337.png
解决方法就是手动修改一下命令把add-missing-primary-keys这个功能加上去
[btnblue href="https://github.com/nextcloud/server/pull/24106/commits/e0dbfdf575506d5bc2a7857a17d923b2a82a8d5f" target="blank"]查看修复详情[/btnblue]
QQ截图20201115183114.png
加上去之后,再次执行命令,直接通过:
QQ截图20201115183152.png
回到网盘重新执行安全检查,通过:
QQ截图20201115183233.png




文章评论