MariaDB 10.2.7: Install broken on master due to database column options #28695
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.