Skip to content

Commit c973507

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: Restore tip regarding schema filtering during migrations
2 parents 7618fb7 + 3aa1cf5 commit c973507

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

messenger.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,36 @@ a table named ``messenger_messages``.
13761376
Or, to create the table yourself, set the ``auto_setup`` option to ``false`` and
13771377
:ref:`generate a migration <doctrine-creating-the-database-tables-schema>`.
13781378

1379+
.. tip::
1380+
1381+
To avoid tools like Doctrine Migrations from trying to remove this table because
1382+
it's not part of your normal schema, you can set the ``schema_filter`` option:
1383+
1384+
.. configuration-block::
1385+
1386+
.. code-block:: yaml
1387+
1388+
# config/packages/doctrine.yaml
1389+
doctrine:
1390+
dbal:
1391+
schema_filter: '~^(?!messenger_messages)~'
1392+
1393+
.. code-block:: xml
1394+
1395+
<!-- config/packages/doctrine.xml -->
1396+
<doctrine:dbal schema-filter="~^(?!messenger_messages)~"/>
1397+
1398+
.. code-block:: php
1399+
1400+
# config/packages/doctrine.php
1401+
$container->loadFromExtension('doctrine', [
1402+
'dbal' => [
1403+
'schema_filter' => '~^(?!messenger_messages)~',
1404+
// ...
1405+
],
1406+
// ...
1407+
]);
1408+
13791409
.. caution::
13801410

13811411
The datetime property of the messages stored in the database uses the

0 commit comments

Comments
 (0)