Nextcloud didn't redirect to new database during upgrade

if you fail to migrate then nextcloud is locked in maintenance so you cannot use it anymore. What you describe is not normal. what is the output of

rpm -qa | grep nextcloud

mysqlshow 

/opt/rh/rh-mariadb105/root/bin/mysqlshow --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock"