Skip to content

Commit dc285a6

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Restore tip regarding schema filtering during migrations
2 parents b50517d + c973507 commit dc285a6

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
@@ -1416,6 +1416,36 @@ a table named ``messenger_messages``.
14161416
Or, to create the table yourself, set the ``auto_setup`` option to ``false`` and
14171417
:ref:`generate a migration <doctrine-creating-the-database-tables-schema>`.
14181418

1419+
.. tip::
1420+
1421+
To avoid tools like Doctrine Migrations from trying to remove this table because
1422+
it's not part of your normal schema, you can set the ``schema_filter`` option:
1423+
1424+
.. configuration-block::
1425+
1426+
.. code-block:: yaml
1427+
1428+
# config/packages/doctrine.yaml
1429+
doctrine:
1430+
dbal:
1431+
schema_filter: '~^(?!messenger_messages)~'
1432+
1433+
.. code-block:: xml
1434+
1435+
<!-- config/packages/doctrine.xml -->
1436+
<doctrine:dbal schema-filter="~^(?!messenger_messages)~"/>
1437+
1438+
.. code-block:: php
1439+
1440+
# config/packages/doctrine.php
1441+
$container->loadFromExtension('doctrine', [
1442+
'dbal' => [
1443+
'schema_filter' => '~^(?!messenger_messages)~',
1444+
// ...
1445+
],
1446+
// ...
1447+
]);
1448+
14191449
.. caution::
14201450

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

0 commit comments

Comments
 (0)