Repository navigation
Description
Summary
Symptom:
An exception occurred while executing
'ALTER TABLE oc_calendarsubscriptions CHANGE `lastmodified` lastmodified INT UNSIGNED DEFAULT NULL NOT NULL'
Reason: MariaDB v10.2.7+ is not supported by doctrine/dbal prior to v2.7.0
OC 10.0.4 - Fix on top of older doctrine/dbal: #29240
OC 10.4.0 - doctrine/dbal updated to v2.8.0: #36290
Quick older doctrine/dbal patch: #28695 (comment)
Initial report:
Master as of today 15/8/17
PHP 7.1.8-2+ubuntu16.04.1+deb.sury.org+4
10.2.7-MariaDB-10.2.7+maria~xenial
- I setup a new laptop, with apache, git, node, mariadb, php7.1.
- Git cloned core, ran make
- Setup db, user
- ran install via occ
tomneedham@tomneedham-X453MA:/var/www/html$ sudo -u www-data ./occ maintenance:install -vv --database=mysql --database-name=owncloud --database-host=localhost --database-user=owncloud --database-pass=owncloud --admin-user=Tom --admin-pass=Tom
ownCloud is not installed - only a limited number of commands are available
Error while trying to create admin user: 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'
Obviously we cant have default=null and NOT NULL....!
Traced this to line https://github.com/owncloud/core/blob/master/core/Migrations/Version20170101215145.php#L213
Dav install migration is here: https://github.com/owncloud/core/blob/master/apps/dav/appinfo/Migrations/Version20170116150538.php#L387 and only specifies unsigned => true.
I think this should have been in the dav app migrations.... de295ca
Weirdly I can't reproduce on another machine.
Could this be related to now having the 8/9 => 10 migrations in core, which include the setup for the dav app. So, during install, we are 'installing' dav before dav has had a change to do its setup?? Maybe....? Brain is still thinking this through.
Activity
tomneedham commentedon Aug 15, 2017

I added in logging to show the migrations being performed. You can see it is running the 8/9 => 10 migrations, despite this being a fresh 10 install. This means the 8/9 migratuions are 'installing' the dav app despite it not being installed yet, which is tricking future core migrations into thinking we are just doing an update here and hence modifying the dav tables, which are not actually up to date yet.tomneedham commentedon Aug 15, 2017
tomneedham commentedon Aug 15, 2017
PVince81 commentedon Aug 15, 2017
hanwentao commentedon Aug 21, 2017
PVince81 commentedon Aug 30, 2017
TheFiZi commentedon Sep 19, 2017
39 remaining items
clayrisser commentedon Nov 14, 2017
PVince81 commentedon Nov 14, 2017
clayrisser commentedon Nov 14, 2017
PVince81 commentedon Nov 14, 2017
clayrisser commentedon Nov 14, 2017
VicDeo commentedon Nov 14, 2017
@jamrizzi the fact is that none of PHP applications that use Doctrine library as a database abstraction layer are compatible with MariaDB 10.2.7 and above due to breaking changes introduced in this MariaDB version.
ownCloud 10.0.4 has a workaround to support MariaDB 10.2.7+ while Doctrine still has no support for it at the moment. It is being discussed for a while in Doctrine and has been not added to it's codebase yet.
See #28695 (comment) for details (including an easy hotfix).
clayrisser commentedon Nov 15, 2017
lock commentedon Aug 1, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
[-]MariaDB 10.2: Install broken on master due to database column options[/-][+]MariaDB 10.2.7: Install broken on master due to database column options[/+]