File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1376,6 +1376,36 @@ a table named ``messenger_messages``.
1376
1376
Or, to create the table yourself, set the ``auto_setup `` option to ``false `` and
1377
1377
:ref: `generate a migration <doctrine-creating-the-database-tables-schema >`.
1378
1378
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
+
1379
1409
.. caution ::
1380
1410
1381
1411
The datetime property of the messages stored in the database uses the
You can’t perform that action at this time.
0 commit comments