I keep getting this problem everytime i try to migrate using the commandline: php bin/console make:migration
or even doctrine:migration status
when i try the doctrine:migration:sync-metadata-storage
as they tell me I still get the same error message.
I'm currently learning symfony and have been following a guide but I get this problem somehow Symfony 4.4 php 7.2
Try changing the DATABASE_URL in .env from
DATABASE_URL=mysql://root:@127.0.0.1:3306/testtest?serverVersion=10.4.11
to
DATABASE_URL=mysql://root:@127.0.0.1:3306/testtest?serverVersion=mariadb-10.4.11
Symfony documentation suggest specifying the version number but not the database type
"There are more options in config/packages/doctrine.yaml that you can configure, including your server_version (e.g. 5.7 if you're using MySQL 5.7), which may affect how Doctrine functions." https://symfony.com/doc/current/doctrine.html
Original Answer: https://github.com/doctrine/DoctrineMigrationsBundle/issues/337#issuecomment-645390496
For MariaDB you will need the full semver compat version: Major.Minor.Patch. By executing mysql --version
, you will get the correct version you are currently running.