Steps to reproduce
- yum update
- Load OwnCloud WebUI
- Click 'Upgrade'
Expected behaviour
OwnCloud to update and become usable again
Actual behaviour
Upgrade fails with the error:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_calendarsubscriptions CHANGE `lastmodified` lastmodified INT UNSIGNED DEFAULT NULL NOT NULL': SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'lastmodified'
Appears to be related to this bug: https://github.com/owncloud/core/issues/28695
Server configuration
Operating system: CentOS 6.9 64-bit
Web server: Apache 2.2
Database: MariaDB 10.2.8
PHP version: PHP 7.0.22
ownCloud version: 10.0.3
Updated from an older ownCloud or fresh install: Update
Where did you install ownCloud from: Offical yum repo, stable-ce
Signing status (ownCloud 9.0 and above): Cannot login to OwnCloud instance at this time
The content of config/config.php:
-bash-4.1$ ./occ config:list system
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
{
"system": {
"instanceid": "51170c94b12b9",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "\/data\/wwwPublic\/siteOwncloud\/data",
"dbtype": "mysql",
"version": "9.1.6.2",
"dbname": "appOwncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"maintenance": true,
"maxZipInputSize": 0,
"allowZipDownload": true,
"theme": "",
"forcessl": true,
"loglevel": "3",
"trusted_domains": [
"owncloud.fizi.ca"
],
"secret": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "no-reply",
"mail_smtpmode": "sendmail",
"mail_domain": "owncloud.fizi.ca",
"trashbin_retention_obligation": "auto",
"updatechecker": false,
"htaccess.RewriteBase": "\/"
}
}
List of activated apps:
-bash-4.1$ ./occ app:list
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:
- activity: 2.3.6
- comments: 0.3.0
- configreport: 0.1.1
- dav: 0.2.7
- federatedfilesharing: 0.3.0
- federation: 0.1.0
- files: 1.5.1
- files_external: true
- files_pdfviewer: 0.8.2
- files_sharing: 0.10.0
- files_texteditor: 2.2.1
- files_trashbin: 0.9.0
- files_versions: 1.3.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- market: true
- notifications: 0.3.0
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- templateeditor: 0.1
- updatenotification: 0.2.1
Disabled:
- encryption
- external
- files_antivirus
- theme-example
- user_external
Are you using external storage, if yes which one: Local
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Any, mainly Firefox 55.0.3 though
Operating system: Windows 10 1703 Pro and Enterprise
Logs
Web server error log
I don't think these are relevant based on the error message
ownCloud log (data/owncloud.log)
{"reqId":"oU02RFJF5ObzvAN80Y1D","level":0,"time":"2017-09-19T17:02:02+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"starting upgrade from 9.1.6.2 to 10.0.3.3"}
{"reqId":"oU02RFJF5ObzvAN80Y1D","level":3,"time":"2017-09-19T17:02:28+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'ALTER TABLE oc_calendarsubscriptions CHANGE `lastmodified` lastmodified INT UNSIGNED DEFAULT NULL NOT NULL':\\n\\nSQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'lastmodified'\",\"Code\":0,\"Trace\":\"#0 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(964): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'ALTER TABLE oc_...')\\n#2 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/DB\\\/Migrator.php(199): Doctrine\\\\DBAL\\\\Connection->query('ALTER TABLE oc_...')\\n#3 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/DB\\\/Migrator.php(81): OC\\\\DB\\\\Migrator->applySchema(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#4 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/DB\\\/Connection.php(424): OC\\\\DB\\\\Migrator->migrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#5 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/DB\\\/MigrationService.php(402): OC\\\\DB\\\\Connection->migrateToSchema(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#6 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/DB\\\/MigrationService.php(358): OC\\\\DB\\\\MigrationService->executeStep(20170101215145)\\n#7 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Updater.php(273): OC\\\\DB\\\\MigrationService->migrate()\\n#8 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Updater.php(223): OC\\\\Updater->doCoreUpgrade()\\n#9 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Updater.php(108): OC\\\\Updater->doUpgrade('10.0.3.3', '9.1.6.2')\\n#10 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/core\\\/Command\\\/Upgrade.php(254): OC\\\\Updater->upgrade()\\n#11 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(262): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#12 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(826): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#13 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(189): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#14 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(120): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#15 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Console\\\/Application.php(160): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#16 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/console.php(106): OC\\\\Console\\\\Application->run()\\n#17 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/occ(11): require_once('\\\/data\\\/wwwPublic...')\\n#18 {main}\",\"File\":\"\\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":115}"}
{"reqId":"WcFjC8CoAGQAAGmlHkQAAAAC","level":3,"time":"2017-09-19T18:33:47+00:00","remoteAddr":"104.128.253.249","user":"--","app":"index","method":"GET","url":"\/core\/js\/oc.js?v=25270803de62e78913f5d555ecad3862","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\TableNotFoundException\",\"Message\":\"An exception occurred while executing 'SELECT * FROM `oc_accounts` WHERE `lower_user_id` = :dcValue1' with params [\\\"\\\"]:\\n\\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'appOwncloud.oc_accounts' doesn't exist\",\"Code\":0,\"Trace\":\"#0 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Statement.php(177): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT * FROM `...', Array)\\n#2 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/public\\\/AppFramework\\\/Db\\\/Mapper.php(252): Doctrine\\\\DBAL\\\\Statement->execute()\\n#3 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/public\\\/AppFramework\\\/Db\\\/Mapper.php(285): OCP\\\\AppFramework\\\\Db\\\\Mapper->execute('SELECT * FROM `...', Array, NULL, NULL)\\n#4 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/public\\\/AppFramework\\\/Db\\\/Mapper.php(379): OCP\\\\AppFramework\\\\Db\\\\Mapper->findOneQuery('SELECT * FROM `...', Array, NULL, NULL)\\n#5 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/User\\\/AccountMapper.php(128): OCP\\\\AppFramework\\\\Db\\\\Mapper->findEntity('SELECT * FROM `...', Array)\\n#6 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/User\\\/Manager.php(158): OC\\\\User\\\\AccountMapper->getByUid(false)\\n#7 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Group\\\/Manager.php(472): OC\\\\User\\\\Manager->get(false)\\n#8 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/legacy\\\/user.php(333): OC\\\\Group\\\\Manager->inGroup(false, 'admin')\\n#9 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/core\\\/js\\\/config.php(76): OC_User::isAdminUser(false)\\n#10 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Route\\\/Route.php(155) : runtime-created function(1): require_once('\\\/data\\\/wwwPublic...')\\n#11 [internal function]: __lambda_func(NULL)\\n#12 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/private\\\/Route\\\/Router.php(307): call_user_func('\\\\x00lambda_415', Array)\\n#13 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/base.php(928): OC\\\\Route\\\\Router->match('\\\/core\\\/js\\\/oc.js')\\n#14 \\\/data\\\/wwwPublic\\\/siteOwncloud\\\/index.php(56): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/data\\\/wwwPublic\\\/siteOwncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":53}"}
Browser log
Preparing update
Set log level to debug
Turned on maintenance mode
Updating database schema
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_calendarsubscriptions CHANGE `lastmodified` lastmodified INT UNSIGNED DEFAULT NULL NOT NULL': SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'lastmodified'