Check database platform
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
Which part of the core could be responsible/taking care for that?
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?
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?
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 ?
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
\Doctrine\DBAL\Connection::getServerVersion() is probably our ticket here
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
MySQL versions can be easily tested on Macs thanks to https://dbngin.com/
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...
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.
- 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.
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
MySql 8.0.14 and beyond support works now again via #5537