File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ patchlevel_event_sourcing:
103103 url: '%env(EVENTSTORE_URL)%'
104104 provide_dedicated_connection: true
105105` ` `
106+ !!! warning
107+
108+ If you use doctrine migrations, you should exclude you projection tables from the schema generation.
109+ The schema is managed by the subscription engine and should not be managed by doctrine.
110+
106111!!! tip
107112
108113 You can autowire the connection in your services like this :
@@ -164,6 +169,16 @@ patchlevel_event_sourcing:
164169 connection:
165170 service: doctrine.dbal.eventstore_connection
166171` ` `
172+ !!! warning
173+
174+ You should exclude your projection tables from the schema generation.
175+
176+ ` ` ` yaml
177+ doctrine:
178+ dbal:
179+ schema_filter: ~^(projection_)~
180+ ` ` `
181+
167182Then you can use this connection in your projections.
168183If you are using autowiring you can inject the right connection `Connection $projectionConnection` parameter name.
169184The prefix `projection` is used to identify the connection.
@@ -289,6 +304,7 @@ patchlevel_event_sourcing:
289304
290305 Set the `read_only` flag to `true` for the old store to avoid side effects
291306 and missing events during the migration.
307+
292308# # Migration
293309
294310You can use [doctrine migrations](https://www.doctrine-project.org/projects/migrations.html) to manage the schema.
You can’t perform that action at this time.
0 commit comments