Skip to content

MariaDB 10.2.7: Install broken on master due to database column options #28695

Closed

Description

@tomneedham

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

  1. I setup a new laptop, with apache, git, node, mariadb, php7.1.
  2. Git cloned core, ran make
  3. Setup db, user
  4. 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.

@PVince81 @DeepDiver1975 ?

Activity

  1. added this to the development milestone on Aug 15, 2017
  2. tomneedham commented on Aug 15, 2017

    @tomneedham
    ContributorAuthor

    screen shot 2017-08-15 at 12 42 56

    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.
  3. tomneedham commented on Aug 15, 2017

    @tomneedham
    Author
  4. tomneedham commented on Aug 15, 2017

    @tomneedham
    Author
  5. PVince81 commented on Aug 15, 2017

    @PVince81
  6. added
    p2-high
    on Aug 16, 2017
  7. hanwentao commented on Aug 21, 2017

    @hanwentao
  8. PVince81 commented on Aug 30, 2017

    @PVince81
  9. modified the milestones: , development on Aug 30, 2017
  10. TheFiZi commented on Sep 19, 2017

    @TheFiZi
  11. 39 remaining items

  12. clayrisser commented on Nov 14, 2017

    @clayrisser
  13. PVince81 commented on Nov 14, 2017

    @PVince81
  14. clayrisser commented on Nov 14, 2017

    @clayrisser
  15. PVince81 commented on Nov 14, 2017

    @PVince81
  16. clayrisser commented on Nov 14, 2017

    @clayrisser
  17. VicDeo commented on Nov 14, 2017

    @VicDeo
    Contributor

    @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).

  18. clayrisser commented on Nov 15, 2017

    @clayrisser
  19. lock commented on Aug 1, 2019

    @lock

    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.

  20. locked as resolved and limited conversation to collaborators on Aug 1, 2019
  21. changed the title [-]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[/+] on Feb 2, 2021
  22. deleted a comment from tomneedham on Feb 2, 2021
  23. deleted a comment from tomneedham on Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

db:mysqlp2-highsettings:installation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions