8000 minor #9547 Add a note about correct cfg value server_version for Mar… · symfony/symfony-docs@cdf1460 · GitHub
[go: up one dir, main page]

Skip to content

Commit cdf1460

Browse files
committed
minor #9547 Add a note about correct cfg value server_version for MariaDB (tristanbes)
This PR was squashed before being merged into the 2.7 branch (closes #9547). Discussion ---------- Add a note about correct cfg value server_version for MariaDB Because when using a MariaDB database, you should prefix the `server_version` with `mariadb-`otherwise doctrine/dbal is not able to recognize it and use `MySQL57Platform` which results in: - possible bugs - endless schema diff generation Because this feature/bug is not documented, it is time to do it properly 📦 👍 * Discussion on doctrine/dbal#2985 (comment) * Also, why it should be prefixed when using `MariaDB`: https://github.com/doctrine/dbal/blob/f76bf5ef631cec551a86c2291fc749534febebf1/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php#L135 Commits ------- e6a9c1d Add a note about correct cfg value server_version for MariaDB
2 parents f812009 + e6a9c1d commit cdf1460

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

reference/configuration/doctrine.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,10 @@ The following block shows all possible configuration keys:
363363
to find your PostgreSQL version and ``mysql -V`` to get your MySQL
364364
version).
365365

366-
Always wrap the server version number with quotes to parse it as a string
366+
  If you are running a MariaDB database, you should prefix the ``server_version``
367+
with ``mariadb-`` (e.g. ``server_version: mariadb-10.2.12``).
368+
369+
  Always wrap the server version number with quotes to parse it as a string
367370
instead of a float number. Otherwise, the floating-point representation
368371
issues can make your version be considered a different number (e.g. ``5.6``
369372
will be rounded as ``5.5999999999999996447286321199499070644378662109375``).

0 commit comments

Comments
 (0)
0