-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doctrine] Document database replicas
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,10 @@ The following block shows all possible configuration keys: | |
path: '%kernel.project_dir%/var/data/data.sqlite' | ||
memory: true | ||
unix_socket: /tmp/mysql.sock | ||
replicas: | ||
read_only_replica: | ||
url: mysql://db_user:[email protected]:3306/db_name_replica | ||
keep_replica: true | ||
# the DBAL wrapperClass option | ||
wrapper_class: App\DBAL\MyConnectionWrapper | ||
charset: utf8mb4 | ||
|
@@ -87,12 +91,23 @@ The following block shows all possible configuration keys: | |
path="%kernel.project_dir%/var/data/data.sqlite" | ||
memory="true" | ||
unix-socket="/tmp/mysql.sock" | ||
keep-replica="true" | ||
wrapper-class="App\DBAL\MyConnectionWrapper" | ||
charset="utf8mb4" | ||
logging="%kernel.debug%" | ||
platform-service="App\DBAL\MyDatabasePlatformService" | ||
server-version="8.0.37"> | ||
<doctrine:replica | ||
name="read_only_replica" | ||
dbname="database" | ||
host="localhost" | ||
port="1234" | ||
user="user" | ||
password="secret" | ||
driver="pdo_mysql" | ||
/> | ||
<doctrine:option key="foo">bar</doctrine:option> | ||
<doctrine:mapping-type name="enum">string</doctrine:mapping-type> | ||
<doctrine:type name="custom">App\DBAL\MyCustomType</doctrine:type> | ||
|