From 54fa0bf58a1d2167c4c1003b1907c1cef8e775e3 Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Tue, 27 Sep 2022 11:06:59 -0400 Subject: [PATCH] Restore tip regarding schema filtering during migrations --- messenger.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/messenger.rst b/messenger.rst index 20f1136de94..e942dfbb2e7 100644 --- a/messenger.rst +++ b/messenger.rst @@ -1439,6 +1439,36 @@ a table named ``messenger_messages``. Or, to create the table yourself, set the ``auto_setup`` option to ``false`` and :ref:`generate a migration `. +.. 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: + + .. configuration-block:: + + .. code-block:: yaml + + # config/packages/doctrine.yaml + doctrine: + dbal: + schema_filter: '~^(?!messenger_messages)~' + + .. code-block:: xml + + # config/packages/doctrine.xml + + + .. code-block:: php + + # config/packages/doctrine.php + $container->loadFromExtension('doctrine', [ + 'dbal' => [ + 'schema_filter' => '~^(?!messenger_messages)~', + // ... + ], + // ... + ]); + .. caution:: The datetime property of the messages stored in the database uses the