Failed Upgrade Help

Nextcloud version (eg, 20.0.5): 20.0.10
Operating system and version (eg, Ubuntu 20.04): Centos 7.7
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.4): 7.2

The issue you are facing:
Upgrading from 20.0.2 to 20.0.10 we are getting the error Doctrine\DBAL\Schema\SchemaException: The table with name ‘rlacloud.oc_jobs’ already exists.
{“reqId”:“oyZn4og3BJ6Jbms6TfIQ”,“level”:3,“time”:“2021-06-10T11:55:25+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::failure: Doctrine\DBAL\Schema\SchemaException: The table with name ‘rlacloud.oc_jobs’ already exists.",“userAgent”:"–",“version”:“20.0.2.2”}
Update failed

If we rename that table then it errors saying the table doesn’t exist

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud log in Admin > Logging:

Can't Access - Stuck up Update screen

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'debug' => false,
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
    2 => '',
    3 => '',
    4 => '',
  ),
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => 'https://,
  'dbtype' => 'mysql',
  'version' => '20.0.2.2',
  'dbname' => 
  'dbhost' => '',
  'dbport' => 
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => ',
  'dbpassword' => '',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 
    'port' => 
    'trusted_domains' => 
    array (
      0 => '',
    ),
    'default_language' => 'en',
    'knowledgebaseenabled' => false,
    'trashbin_retention_obligation' => 'auto, 5',
    'allow_user_to_change_display_name' => false,
    'appstoreenabled' => false,
    'enable_previews' => false,
    'enable_avatars' => false,
    'remember_login_cookie_lifetime' => 0,
  ),
  'mail_smtpmode' => 
  'mail_from_address' => 
  'mail_domain' => 
  'mail_smtphost' => 
  'mail_smtpport' => 
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 
  'mail_smtpauth' => 1,
  'mail_smtpname' => 
  'mail_smtppassword' => 
  'mail_smtpauthtype' => 
  'updater.secret' => 
);

I’m a little further and now getting the below error:

• Type: Doctrine\DBAL\Exception\InvalidFieldNameException
• Code: 0
• Message: An exception occurred while executing ‘SELECT * FROM oc_authtoken WHERE (token = ?) AND (version = ?)’ with params [“a29e29ac77159d56eb4d3249a7f87fd2e49a67774d212b1dc9be682c3c0861f0a6a31feca7d331d158a825d810e99101ef37fc6a192a0510e4c5660ac0f296b7”, 2]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘version’ in ‘where clause’
• File: /var/www/html/public/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
• Line: 60