Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Doctrine Messenger table can now be generated with a migration diff #13651

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions messenger.rst
Original file line number Diff line number Diff line change
@@ -905,21 +905,15 @@ The Doctrine transport can be used to store messages in a database table.

The format is ``doctrine://<connection_name>``, in case you have multiple connections
and want to use one other than the "default". The transport will automatically create
a table named ``messenger_messages`` (this is configurable) when the transport is
first used. You can disable that with the ``auto_setup`` option and set the table
up manually by calling the ``messenger:setup-transports`` command.
a table named ``messenger_messages``.

.. tip::

To avoid tools like Doctrine Migrations from trying to remove this table because
it's not part of your normal schema, you can set the ``schema_filter`` option:
.. versionadded:: 5.1

.. code-block:: yaml
The ability to automatically generate a migration for the ``messenger_messages``
table was introduced in Symfony 5.1 and DoctrineBundle 2.1.

# config/packages/doctrine.yaml
doctrine:
dbal:
schema_filter: '~^(?!messenger_messages)~'
Or, to create the table yourself, set the ``auto_setup`` option to ``false`` and
:ref:`generate a migration <doctrine-creating-the-database-tables-schema>`.

The transport has a number of options: