Skip to content

Commit 00c7a5e

Browse files
authored
Merge pull request #398 from thePanz/patch-1
Mention the server-version for migrations
2 parents 8656002 + 94a42de commit 00c7a5e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Resources/doc/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,23 @@ This ignores the tables, and any named objects such as sequences, on the DBAL le
444444
Note that if you have multiple connections configured then the ``schema_filter`` configuration
445445
will need to be placed per-connection.
446446

447+
Troubleshooting out of sync metadata storage issue
448+
--------------------------------------------------
449+
``doctrine/migrations`` relies on a properly configured Database server version in the connection string to manage the table storing the
450+
migrations, also known as the metadata storage.
451+
452+
If you encounter the error ``The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.``
453+
when running the command ``doctrine:migrations:migrate`` or the suggested command itself ``doctrine:migrations:sync-metadata-storage`` please
454+
check the database connection string, and make sure that the proper server version is defined. If you are running a MariaDB database,
455+
you should prefix the server version with ``mariadb-`` (ex: ``mariadb-10.2.12``). See the `configuring_database`_ section.
456+
457+
Example connection string for MariaDB:
458+
459+
.. code-block:: terminal
460+
DATABASE_URL=mysql://root:@127.0.0.1:3306/testtest?serverVersion=mariadb-10.4.11
461+
447462
.. _documentation: https://www.doctrine-project.org/projects/doctrine-migrations/en/current/index.html
463+
.. _configuring_database: https://symfony.com/doc/current/doctrine.html#configuring-the-database
448464
.. _DoctrineMigrationsBundle: https://github.com/doctrine/DoctrineMigrationsBundle
449465
.. _`Doctrine Database Migrations`: https://github.com/doctrine/migrations
450466
.. _`Symfony Flex`: https://symfony.com/doc/current/setup/flex.html

0 commit comments

Comments
 (0)