1091 Can't DROP 'PRIMARY' with upgrade 8.1.6->8.1.9

81x-eol
upgrade
help

#1

Dear all,

I face the following error message, and after spending days on Github and forums, I am stuck.

When trying to update 8.1.6 to 8.1.9, I get an error message concerning oc_appconfig in the database.

What I checked and did ...
* MySQL not corrupt
* Owncloud user has all rights to owncloud DB
* last DB Backup successfully restored
* sudo -u www-data php occ maintenance:repair
* 3-months-old backup of owncloud and the mysql database recovered (at time of backup in April, owncloud was just running perfectly smoothly and stable and there had been no updates downloaded or initiated)
* no duplicate entries in database tables or other various stuff reported with similar issues on Github

Steps to reproduce
1. download and extract owncloud 8.1.9 file from owncloud repos
2. copy all files to /var/www/owncloud
3. chown root:root /var/www/owncloud/occrights.sh && chmod u+x /var/www/owncloud/occrights.sh && sh /var/www/owncloud/occrights.sh
4. sudo -u www-data php /var/www/owncloud/occ upgrade or sudo -u www-data php /var/www/owncloud/occ upgrade --skip-migration-test

Expected behaviour
Upgrade should proceed and finish.

Actual behaviour
Error message ..

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_appconfig DROP PRIMARY KEY':

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column/key exists
Update failed

Server configuration
Operating system: Ubuntu 14.04.1
Web server: apache2
Database: Mysql 5.5.50
PHP version: 5.6
ownCloud version (see ownCloud admin page): 8.1.6
Updated from an older ownCloud or fresh install: so far, continuously updated since v6 via SUSE repos http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/

ownCloud log:

{"reqId":"jPKaRZr0kFDLNWqHQydo","remoteAddr":"","app":"PHP","message":"file_put_contents(\/var\/www\/owncloud\/data\/.htaccess): failed to open stream: Permission denied at \/var\/www\/owncloud\/lib\/private\/setup.php#435","level":3,"time":"2016-07-24T12:19:26+00:00","method":"--","url":"--"}
{"reqId":"jPKaRZr0kFDLNWqHQydo","remoteAddr":"","app":"core","message":"Failed to update database structure (exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column\/key exists' in \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/PDOConnection.php:104\nStack trace:\n#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/PDOConnection.php(104): PDO->query('ALTER TABLE oc_...')\n#1 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(935): Doctrine\\DBAL\\Driver\\PDOConnection->query('ALTER TABLE oc_...')\n#2 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(219): Doctrine\\DBAL\\Connection->query('ALTER TABLE oc_...')\n#3 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(69): OC\\DB\\Migrator->applySchema(Object(Doctrine\\DBAL\\Schema\\Schema))\n#4 \/var\/www\/owncloud\/lib\/private\/db\/mdb2schemamanager.php(121): OC\\DB\\Migrator->migrate(Object(Doctrine\\DBAL\\Schema\\Schema))\n#5 \/var\/www\/owncloud\/lib\/private\/db.php(231): OC\\DB\\MDB2SchemaManager->updateDbFromStructure('\/var\/www\/ownclo...')\n#6 \/var\/www\/owncloud\/lib\/private\/updater.php(354): OC_DB::updateDbFromStructure('\/var\/www\/ownclo...')\n#7 \/var\/www\/owncloud\/lib\/private\/updater.php(322): OC\\Updater->doCoreUpgrade()\n#8 \/var\/www\/owncloud\/lib\/private\/updater.php(205): OC\\Updater->doUpgrade('8.1.9.2', '8.1.6.2')\n#9 \/var\/www\/owncloud\/core\/command\/upgrade.php(187): OC\\Updater->upgrade()\n#10 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Command\/Command.php(253): OC\\Core\\Command\\Upgrade->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#11 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(874): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#12 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(195): Symfony\\Component\\Console\\Application->doRunCommand(Object(OC\\Core\\Command\\Upgrade), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#13 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(126): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#14 \/var\/www\/owncloud\/lib\/private\/console\/application.php(96): Symfony\\Component\\Console\\Application->run(NULL, NULL)\n#15 \/var\/www\/owncloud\/console.php(68): OC\\Console\\Application->run()\n#16 \/var\/www\/owncloud\/occ(11): require_once('\/var\/www\/ownclo...')\n#17 {main}\n\nNext exception 'Doctrine\\DBAL\\Driver\\PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column\/key exists' in \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/PDOConnection.php:106\nStack trace:\n#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(935): Doctrine\\DBAL\\Driver\\PDOConnection->query('ALTER TABLE oc_...')\n#1 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(219): Doctrine\\DBAL\\Connection->query('ALTER TABLE oc_...')\n#2 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(69): OC\\DB\\Migrator->applySchema(Object(Doctrine\\DBAL\\Schema\\Schema))\n#3 \/var\/www\/owncloud\/lib\/private\/db\/mdb2schemamanager.php(121): OC\\DB\\Migrator->migrate(Object(Doctrine\\DBAL\\Schema\\Schema))\n#4 \/var\/www\/owncloud\/lib\/private\/db.php(231): OC\\DB\\MDB2SchemaManager->updateDbFromStructure('\/var\/www\/ownclo...')\n#5 \/var\/www\/owncloud\/lib\/private\/updater.php(354): OC_DB::updateDbFromStructure('\/var\/www\/ownclo...')\n#6 \/var\/www\/owncloud\/lib\/
private\/updater.php(322): OC\\Updater->doCoreUpgrade()\n#7 \/var\/www\/owncloud\/lib\/private\/updater.php(205): OC\\Updater->doUpgrade('8.1.9.2', '8.1.6.2')\n#8 \/var\/www\/owncloud\/core\/command\/upgrade.php(187): OC\\Updater->upgrade()\n#9 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Command\/Command.php(253): OC\\Core\\Command\\Upgrade->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#10 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(874): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#11 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(195): Symfony\\Component\\Console\\Application->doRunCommand(Object(OC\\Core\\Command\\Upgrade), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#12 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(126): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#13 \/var\/www\/owncloud\/lib\/private\/console\/application.php(96): Symfony\\Component\\Console\\Application->run(NULL, NULL)\n#14 \/var\/www\/owncloud\/console.php(68): OC\\Console\\Application->run()\n#15 \/var\/www\/owncloud\/occ(11): require_once('\/var\/www\/ownclo...')\n#16 {main}\n\nNext exception 'Doctrine\\DBAL\\Exception\\DriverException' with message 'An exception occurred while executing 'ALTER TABLE oc_appconfig DROP PRIMARY KEY':\n\nSQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column\/key exists' in \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php:115\nStack trace:\n#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(116): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(945): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'ALTER TABLE oc_...')\n#2 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(219): Doctrine\\DBAL\\Connection->query('ALTER TABLE oc_...')\n#3 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(69): OC\\DB\\Migrator->applySchema(Object(Doctrine\\DBAL\\Schema\\Schema))\n#4 \/var\/www\/owncloud\/lib\/private\/db\/mdb2schemamanager.php(121): OC\\DB\\Migrator->migrate(Object(Doctrine\\DBAL\\Schema\\Schema))\n#5 \/var\/www\/owncloud\/lib\/private\/db.php(231): OC\\DB\\MDB2SchemaManager->updateDbFromStructure('\/var\/www\/ownclo...')\n#6 \/var\/www\/owncloud\/lib\/private\/updater.php(354): OC_DB::updateDbFromStructure('\/var\/www\/ownclo...')\n#7 \/var\/www\/owncloud\/lib\/private\/updater.php(322): OC\\Updater->doCoreUpgrade()\n#8 \/var\/www\/owncloud\/lib\/private\/updater.php(205): OC\\Updater->doUpgrade('8.1.9.2', '8.1.6.2')\n#9 \/var\/www\/owncloud\/core\/command\/upgrade.php(187): OC\\Updater->upgrade()\n#10 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Command\/Command.php(253): OC\\Core\\Command\\Upgrade->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#11 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(874): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#12 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(195): Symfony\\Component\
\Console\\Application->doRunCommand(Object(OC\\Core\\Command\\Upgrade), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#13 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(126): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#14 \/var\/www\/owncloud\/lib\/private\/console\/application.php(96): Symfony\\Component\\Console\\Application->run(NULL, NULL)\n#15 \/var\/www\/owncloud\/console.php(68): OC\\Console\\Application->run()\n#16 \/var\/www\/owncloud\/occ(11): require_once('\/var\/www\/ownclo...')\n#17 {main})","level":4,"time":"2016-07-24T12:19:28+00:00","method":"--","url":"--"}
{"reqId":"jPKaRZr0kFDLNWqHQydo","remoteAddr":"","app":"update","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'ALTER TABLE oc_appconfig DROP PRIMARY KEY':\\n\\nSQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column\\\/key exists\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(945): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'ALTER TABLE oc_...')\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/migrator.php(219): Doctrine\\\\DBAL\\\\Connection->query('ALTER TABLE oc_...')\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/migrator.php(69): OC\\\\DB\\\\Migrator->applySchema(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/mdb2schemamanager.php(121): OC\\\\DB\\\\Migrator->migrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db.php(231): OC\\\\DB\\\\MDB2SchemaManager->updateDbFromStructure('\\\/var\\\/www\\\/ownclo...')\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/updater.php(354): OC_DB::updateDbFromStructure('\\\/var\\\/www\\\/ownclo...')\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/updater.php(322): OC\\\\Updater->doCoreUpgrade()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/updater.php(205): OC\\\\Updater->doUpgrade('8.1.9.2', '8.1.6.2')\\n#9 \\\/var\\\/www\\\/owncloud\\\/core\\\/command\\\/upgrade.php(187): OC\\\\Updater->upgrade()\\n#10 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Command\\\/Command.php(253): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#11 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Application.php(874): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#12 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Application.php(195): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#13 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Application.php(126): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#14 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/console\\\/application.php(96): Symfony\\\\Component\\\\Console\\\\Application->run(NULL, NULL)\\n#15 \\\/var\\\/www\\\/owncloud\\\/console.php(68): OC\\\\Console\\\\Application->run()\\n#16 \\\/var\\\/www\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/ownclo...')\\n#17 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":115}","level":4,"time":"2016-07-24T12:19:28+00:00","method":"--","url":"--"}
{"reqId":"TA26ie4BJYFJNjvjY7pm","remoteAddr":"","app":"PHP","message":"file_put_contents(\/var\/www\/owncloud\/data\/.htaccess): failed to open stream: Permission denied at \/var\/www\/owncloud\/lib\/private\/setup.php#435","level":3,"time":"2016-07-24T12:23:29+00:00","method":"--","url":"--"}
{"reqId":"TA26ie4BJYFJNjvjY7pm","remoteAddr":"","app":"core","message":"Simulated database structure update failed (exception 'OC\\DB\\MigrationException' with message 'An exception occurred while executing 'ALTER TABLE oc_oc_appconfig_rs8xe82z444ua DROP PRIMARY KEY':\n\nSQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column\/key exists' in \/var\/www\/owncloud\/lib\/private\/db\/migrator.php:152\nStack trace:\n#0 \/var\/www\/owncloud\/lib\/private\/db\/migrator.php(110): OC\\DB\\Migrator->checkTableMigrate(Object(Doctrine\\DBAL\\Schema\\Table))\n#1 \/var\/www\/owncloud\/lib\/private\/db\/mdb2schemamanager.php(133): OC\\DB\\Migrator->checkMigrate(Object(Doctrine\\DBAL\\Schema\\Schema))\n#2 \/var\/www\/owncloud\/lib\/private\/db.php(248): OC\\DB\\MDB2SchemaManager->simulateUpdateDbFromStructure('\/var\/www\/ownclo...')\n#3 \/var\/www\/owncloud\/lib\/private\/updater.php(347): OC_DB::simulateUpdateDbFromStructure('\/var\/www\/ownclo...')\n#4 \/var\/www\/owncloud\/lib\/private\/updater.php(314): OC\\Updater->checkCoreUpgrade()\n#5 \/var\/www\/owncloud\/lib\/private\/updater.php(205): OC\\Updater->doUpgrade('8.1.9.2', '8.1.6.2')\n#6 \/var\/www\/owncloud\/core\/command\/upgrade.php(187): OC\\Updater->upgrade()\n#7 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Command\/Command.php(253): OC\\Core\\Command\\Upgrade->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#8 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(874): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#9 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(195): Symfony\\Component\\Console\\Application->doRunCommand(Object(OC\\Core\\Command\\Upgrade), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#10 \/var\/www\/owncloud\/3rdparty\/symfony\/console\/Symfony\/Component\/Console\/Application.php(126): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#11 \/var\/www\/owncloud\/lib\/private\/console\/application.php(96): Symfony\\Component\\Console\\Application->run(NULL, NULL)\n#12 \/var\/www\/owncloud\/console.php(68): OC\\Console\\Application->run()\n#13 \/var\/www\/owncloud\/occ(11): require_once('\/var\/www\/ownclo...')\n#14 {main})","level":4,"time":"2016-07-24T12:23:31+00:00","method":"--","url":"--"}
{"reqId":"TA26ie4BJYFJNjvjY7pm","remoteAddr":"","app":"update","message":"Exception: {\"Exception\":\"OC\\\\DB\\\\MigrationException\",\"Message\":\"An exception occurred while executing 'ALTER TABLE oc_oc_appconfig_rs8xe82z444ua DROP PRIMARY KEY':\\n\\nSQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'PRIMARY'; check that column\\\/key exists\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/migrator.php(110): OC\\\\DB\\\\Migrator->checkTableMigrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Table))\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/mdb2schemamanager.php(133): OC\\\\DB\\\\Migrator->checkMigrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db.php(248): OC\\\\DB\\\\MDB2SchemaManager->simulateUpdateDbFromStructure('\\\/var\\\/www\\\/ownclo...')\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/updater.php(347): OC_DB::simulateUpdateDbFromStructure('\\\/var\\\/www\\\/ownclo...')\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/updater.php(314): OC\\\\Updater->checkCoreUpgrade()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/updater.php(205): OC\\\\Updater->doUpgrade('8.1.9.2', '8.1.6.2')\\n#6 \\\/var\\\/www\\\/owncloud\\\/core\\\/command\\\/upgrade.php(187): OC\\\\Updater->upgrade()\\n#7 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Command\\\/Command.php(253): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#8 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Application.php(874): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#9 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Application.php(195): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#10 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/symfony\\\/console\\\/Symfony\\\/Component\\\/Console\\\/Application.php(126): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#11 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/console\\\/application.php(96): Symfony\\\\Component\\\\Console\\\\Application->run(NULL, NULL)\\n#12 \\\/var\\\/www\\\/owncloud\\\/console.php(68): OC\\\\Console\\\\Application->run()\\n#13 \\\/var\\\/www\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/ownclo...')\\n#14 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/migrator.php\",\"Line\":152}","level":4,"time":"2016-07-24T12:23:31+00:00","method":"--","url":"--"}
{"reqId":"q3Q7yNkRhNZ5TF9Hzfuf","remoteAddr":"192.168.1.22","app":"index","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/app.php(98): OC_App::loadApp('files')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/util.php(127): OC_App::loadApps(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(876): OC_Util::setupFS()\\n#3 \\\/var\\\/www\\\/owncloud\\\/index.php(48): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/app.php\",\"Line\":118}","level":4,"time":"2016-07-24T12:39:53+00:00"}

config.php:

<?php
$CONFIG = array (
  'instanceid' => 'oc3a41047555',
  'passwordsalt' => '3ee12637fa36136a5e3cbe60433a1f',
  'datadirectory' => '/var/www/owncloud/data',
  'dbtype' => 'mysql',
  'dbname' => 'ownclouddb',
  'dbuser' => 'owncloudusr',
  'dbpassword' => 'owncloudpwd',
  'dbhost' => 'localhost',
  'version' => '8.1.6.2',
  'installed' => true,
  'forcessl' => true,
  'theme' => '',
  'maintenance' => false,
  'trusted_domains' => 
  array (
    0 => '192.168.1.1',
    1 => 'localhost',
    2 => 'home.hyomain.de',
  ),
  'forceSSLforSubdomains' => true,
  'appcodechecker' => false,
  'xframe_restriction' => false,
  'cache_path' => '',
  'quota_include_external_storage' => false,
  'filesystem_check_changes' => 0,
  'appstore.experimental.enabled' => false,
  'updatechecker' => false,
);

Any ideas would be greatly appreciated.

Best
Chris


#2

Hi,

please report this directly to the bugtracker:

https://github.com/owncloud/core/issues

Afterwards please link the created issue in here.


#3

Sorry, can't post link, get error message ...

IssueID @GitHub owncloud/core = 25590

Best
Chris


#4

Mhhh, strange. But thanks for reporting this, here is the link:


#5

Update:

It looks like that the database was (is?) not in MySQL but in SQLite3.

On the system there is an (older) MySQL database (from an ancient installation) and but the most recent data seem to be in a SQLite database (at least SQlite was specified in config.php of the backup). The existence of the MySQL database confused me.

So, I assume that the issue reported above was due to MySQL trying to read a SQLite database.

I still have an issue, but will move this to a new thread. This one can be closed.

Sorry for taking your time

Chris