Skip to content

Commit 3aa1cf5

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Restore tip regarding schema filtering during migrations
2 parents c69ec43 + f570459 commit 3aa1cf5

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

1337+
.. tip::
1338+
1339+
To avoid tools like Doctrine Migrations from trying to remove this table because
1340+
it's not part of your normal schema, you can set the ``schema_filter`` option:
1341+
1342+
.. configuration-block::
1343+
1344+
.. code-block:: yaml
1345+
1346+
# config/packages/doctrine.yaml
1347+
doctrine:
1348+
dbal:
1349+
schema_filter: '~^(?!messenger_messages)~'
1350+
1351+
.. code-block:: xml
1352+
1353+
<!-- config/packages/doctrine.xml -->
1354+
<doctrine:dbal schema-filter="~^(?!messenger_messages)~"/>
1355+
1356+
.. code-block:: php
1357+
1358+
# config/packages/doctrine.php
1359+
$container->loadFromExtension('doctrine', [
1360+
'dbal' => [
1361+
'schema_filter' => '~^(?!messenger_messages)~',
1362+
// ...
1363+
],
1364+
// ...
1365+
]);
1366+
13371367
.. caution::
13381368

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

0 commit comments

Comments
 (0)