Incorrect row format found in your database. ROW_FORMAT=Dynamic offers the best database performances for Nextcloud. Please update row format on the following list:
ā¦
Nitrokey failed to fix that database issue in their latest update to the by today already half-way to EOL Nextcloud version 32. The issue was introduced in Nextcloud 31 about a year ago. So now everyone is shown this big warning in the administration overview.
Since I refuse to just ignore warnings in general, plus I have lost any customer support anyway, I went ahead and fixed this issue myself. Here I want to share how I did it, without actually suggesting anyone to do the same. Be warned, that you might be denied customer support, too, if you do stuff like that. So use it at your own risk!
Here is a shell command copy paste to run on the Nextbox when connected via SSH:
# set compose file variable
compose_file="/usr/lib/nextbox-compose/docker-compose.yml"
# get database password from nextcloud config
db_pw=$(grep dbpassword "/srv/nextcloud/config/config.php" | awk -F"'" '{print $4}')
# turn on maintenance mode
sudo docker-compose --file "$compose_file" exec -T --user www-data app php occ maintenance:mode --on --quiet
# assemble sql query to generate alter table statements
sql_query="SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' ROW_FORMAT=DYNAMIC;')
FROM information_schema.tables
WHERE table_schema = 'nextcloud' AND ROW_FORMAT != 'Dynamic';"
# run the sql query to generate alter table statements
# pipe the statements to another database command to execute them
if sudo docker-compose --file "$compose_file" exec -T --user www-data db \
mariadb --user nextcloud -p"$db_pw" --skip-column-names -e "$sql_query" |
sudo docker-compose --file "$compose_file" exec -T --user www-data db \
mariadb --user nextcloud -p"$db_pw" nextcloud; then
echo "done"
else
echo "altering database failed"
fi
# turn off maintenance mode
sudo docker-compose --file "$compose_file" exec -T --user www-data app php occ maintenance:mode --off --quiet