Oplossing
Bij Nextcloud AIO kon ik de melding oplossen door de ontbrekende database-indexen toe te voegen via occ.
Vanaf de host heb ik eerst een dry-run uitgevoerd:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ db:add-missing-indices --dry-run
Dit gaf de volgende output:
Adding additional mail_msg_thrd_root_snt_idx index to the oc_mail_messages table, this can take some time...
oc_mail_messages table updated successfully.
Adding additional mail_recip_eml_type_mid_idx index to the oc_mail_recipients table, this can take some time...
Removing mail_recipient_email_idx index from the oc_mail_recipients table
oc_mail_recipients table updated successfully.
DROP INDEX mail_recipient_email_idx;
CREATE INDEX mail_recip_eml_type_mid_idx ON oc_mail_recipients (email, type, message_id);
CREATE INDEX mail_msg_thrd_root_snt_idx ON oc_mail_messages (mailbox_id, thread_root_id, sent_at);
Omdat de dry-run er goed uitzag, heb ik daarna het commando echt uitgevoerd:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ db:add-missing-indices
Output:
Adding additional mail_msg_thrd_root_snt_idx index to the oc_mail_messages table, this can take some time...
oc_mail_messages table updated successfully.
Adding additional mail_recip_eml_type_mid_idx index to the oc_mail_recipients table, this can take some time...
Removing mail_recipient_email_idx index from the oc_mail_recipients table
oc_mail_recipients table updated successfully.
Daarna was de melding Database missing indices verdwenen uit het Nextcloud Administration Center.
Log controleren
Ik heb daarna ook nog de Nextcloud-log gecontroleerd:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud sh -lc '
LOG="$(php occ config:system:get datadirectory)/nextcloud.log"
echo "Logbestand: $LOG"
tail -n 200 "$LOG"
'
In mijn geval stonden daar geen nieuwe relevante errors meer in.
Let op bij Nextcloud AIO
Bij Nextcloud AIO heet de Nextcloud-container meestal:
nextcloud-aio-nextcloud
De database-container heette in mijn installatie:
nextcloud-aio-database
Dus niet:
nextcloud-aio-postgresql
PostgreSQL-logs kun je bijvoorbeeld zo bekijken:
sudo docker logs --since=24h nextcloud-aio-database 2>&1 | tail -n 200
Conclusie
De melding was opgelost met:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ db:add-missing-indices
Na het uitvoeren van dit commando verdween de waarschuwing uit het Administration Center.