After some updates the installation/the database needs to be fixed. This can be done with the command line tool on a debian system where the installation belongs to the apache user www-data:
cd <installdir>
sudo -u www-data php occ db:add-missing-indices
sudo -u www-data php occ db:add-missing-columns