contao / installation-bundle

[READ-ONLY] Contao Installation Bundle
GNU Lesser General Public License v3.0
8 stars 9 forks source link

Schema diff fails with MariaDB 10.2 #83

Closed m-vo closed 6 years ago

m-vo commented 6 years ago

I upgraded to MariaDB 10.2.12 (10.2.12-MariaDB-10.2.12+maria~xenial) on my dev machine and noticed that now the schema diff stopped working properly (contao bundles 4.5.1, doctrine/dbal 2.6.3).

I haven't had time to investigate further but here is what I am seeing: There are lots of entries that request to alter tables (even without the tables existing) and - if existing - columns.

This is what's happening to a new install:

screenshot_20180105_181554

screenshot_20180105_184512

@leofeyer I noticed that you referred to the same or a similar problem here but I'm not sure if there was a solution.

Also there seems to be a related issue in the community forum.


By the way: Having innodb_strict_mode disabled and/or sql_mode set to just NO_ENGINE_SUBSTITUTION doesn't make a difference.

m-vo commented 6 years ago

Had a quick look in the debugger. It's the same issue as in here: https://github.com/contao/core-bundle/issues/918#issuecomment-315855902

So _default equals "''" in $fromSchema vs. "" in $toSchema.

(Also: doctrine entities get created successfully but then are missing in the $fromSchema. Not sure if this had worked before.)

leofeyer commented 6 years ago

See https://github.com/contao/core-bundle/issues/918#issuecomment-315855902

fritzmg commented 6 years ago

@leofeyer all tickets (including https://jira.mariadb.org/browse/MDEV-13132) are closed now, yet the issue still exists.

m-vo commented 6 years ago

I am still not sure if it's a MariaDB or a doctrine issue. But it looks like it is the latter as doctrine seems to only support MariaDB 10.2. as of v2.7 which is not released yet.

I can confirm that using the current doctrine/dbal dev-master branch solves the default value problem but it could still take a long time until a stable branch will get released. So unfortunately Contao is not compatible to Maria DB 10.2 right now, right? :-/

leofeyer commented 6 years ago

Correct, you need Doctrine 2.7 (not yet released).