Skip to content

Commit 7b7df85

Browse files
committed
add schema exclude for projection notice in docs
1 parent 952358f commit 7b7df85

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/pages/configuration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
167182
Then you can use this connection in your projections.
168183
If you are using autowiring you can inject the right connection `Connection $projectionConnection` parameter name.
169184
The 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

294310
You can use [doctrine migrations](https://www.doctrine-project.org/projects/migrations.html) to manage the schema.

0 commit comments

Comments
 (0)