Update from 21.02 to 21.03 failed

Nextcloud version (eg, 20.0.5): 21.02
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.29
PHP version (eg, 7.4): 7.4
database: postgres

The issue you are facing:

update from 21.02 fails with error:

Preparazione dell'aggiornamento
Imposta il livello del log per il debug
Modalità di manutenzione attivata
Fase di riparazione: Repair MySQL collation
Informazioni di riparazione: Not a mysql database -> nothing to do
Fase di riparazione: Repair SQLite autoincrement
Fase di riparazione: Copy data from accounts table when migrating from ownCloud
OC\DB\Exceptions\DbalException: An exception occurred while executing a query: An exception occurred while executing a query: SQLSTATE[21000]: Cardinality violation: 7 ERRORE: più di una riga restituita da una sottoquery usata come espressione

Is this the first time you’ve seen this error? Y

Steps to replicate it:

  1. Start update process from web interface
  2. Wait for it to fails

The output of your Nextcloud log in Admin > Logging:

I can’t access next cloud log because the system is in maintenance mode