neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

Check database platform

Open mhsdesign opened this issue 2 years ago • 13 comments

Supported DB platforms must be checked when setting up/using the ES CR and we should also assert that with our CI pipeline.

Original description:

See slack, where i was confused, why the doctrine:migrate would run through because:

An exception occurred while executing 'CREATE TABLE neos_neos_projection_asset_usage...

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes

i found out, that mariadb 10.3 is to old and it works with mariadb 10.4 after upgrading

https://neos-project.slack.com/archives/C3MCBK6S2/p1686684718496799

we should also enforce thoses constraints somehow - no? Or throw a nice error message :P

Related: #4434

mhsdesign avatar Jun 14 '23 05:06 mhsdesign

Which part of the core could be responsible/taking care for that?

crydotsnake avatar Jun 22 '23 18:06 crydotsnake

Thats a tricky problem, because as far as i understand it can just depend on the sql features we are using (the migrations)

So maybe the easiest is to enhance a doctrine migrate error with a note that your current db version is maybe to less?

mhsdesign avatar Jun 22 '23 19:06 mhsdesign

So maybe the easiest is to enhance a doctrine migrate error with a note that your current db version is maybe to less?

Sounds good. But how do we check which mariadb is installed on the specific system?

crydotsnake avatar Jun 22 '23 19:06 crydotsnake

Idk but this information should be available. You can ask the connection and SELECT VERSION or sth idk. But i feel like we should still have a constraint. Like each package can declare it only works with Mariadb or Mysql or Postgres bla, and flow will validate this. Wdyt @kitsunet ?

mhsdesign avatar Jun 22 '23 20:06 mhsdesign

I took the freedom to rename this issue so that it can act as a replacement for #4435 – I also added it to the project board and prioritized it

bwaidelich avatar Aug 04 '23 12:08 bwaidelich

\Doctrine\DBAL\Connection::getServerVersion() is probably our ticket here

kitsunet avatar Nov 17 '23 08:11 kitsunet

Yes that seems like it, but as far as i know there is no way of knowing except with testing if a maria or mysql version would work. Should we just set a sane limit like mariadb 10.4 (as i tested 10.3 which failed?) Then we have to find out which mysql version would work, ive heard we need 8 and that we can validate in the neos/setup

mhsdesign avatar Nov 17 '23 08:11 mhsdesign

MySQL versions can be easily tested on Macs thanks to https://dbngin.com/

bwaidelich avatar Nov 17 '23 09:11 bwaidelich

https://docs.neos.io/guide/installation-development-setup/system-requirements#database

has some infos on that, I assume no compressed row format enabled for you.

I guess 10.4 / 8.0 is fine...

kitsunet avatar Nov 17 '23 09:11 kitsunet

yes well these informations might be outdated if someone felt like using a never db feature. But i think enforcing this in the setup is important so people now whats wrong.

mhsdesign avatar Nov 17 '23 09:11 mhsdesign

  • The subtree tags pr https://github.com/neos/neos-development-collection/pull/4659 introduced a violation check that does not run on older mariadb versions like 10.4, this was not an essential feature of the system and all the normal content repository operation worked
  • With https://github.com/neos/neos-development-collection/pull/5025 the time of mariadb 10.4 is now fully over. The new move node queries also using advanced new json features of maria db

i updated to maria db 11.0 but Bernhard could confirm that 10.6 also supports all the required features.

mhsdesign avatar May 10 '24 17:05 mhsdesign

Apparently, the subtree change also broke compatibility with MySQL (#5252) – I'm on it, but we should also add the supported database to our CI test matrix to avoid regressions in the future

bwaidelich avatar Sep 19 '24 07:09 bwaidelich

MySql 8.0.14 and beyond support works now again via #5537

mhsdesign avatar Apr 03 '25 15:04 mhsdesign