File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ The database connection information is stored as an environment variable called
46
46
# customize this line!
47
47
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
48
48
49
+ # to use mariadb:
50
+ DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=mariadb-10.5.8"
51
+
49
52
# to use sqlite:
50
53
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
51
54
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Then configure the ``DATABASE_URL`` environment variable in ``.env``:
35
35
# .env (or override DATABASE_URL in .env.local to avoid committing your changes)
36
36
37
37
# customize this line!
38
- DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name"
38
+ DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7 "
39
39
40
40
Further things can be configured in ``config/packages/doctrine.yaml `` - see
41
41
:ref: `reference-dbal-configuration `. Remove the ``orm `` key in that file
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ The following block shows all possible configuration keys:
65
65
charset : UTF8
66
66
logging : ' %kernel.debug%'
67
67
platform_service : App\DBAL\MyDatabasePlatformService
68
- server_version : ' 5.6 '
68
+ server_version : ' 5.7 '
69
69
mapping_types :
70
70
enum : string
71
71
types :
@@ -99,7 +99,7 @@ The following block shows all possible configuration keys:
99
99
charset =" UTF8"
100
100
logging =" %kernel.debug%"
101
101
platform-service =" App\DBAL\MyDatabasePlatformService"
102
- server-version =" 5.6 " >
102
+ server-version =" 5.7 " >
103
103
104
104
<doctrine : option key =" foo" >bar</doctrine : option >
105
105
<doctrine : mapping-type name =" enum" >string</doctrine : mapping-type >
@@ -121,8 +121,8 @@ The following block shows all possible configuration keys:
121
121
122
122
Always wrap the server version number with quotes to parse it as a string
123
123
instead of a float number. Otherwise, the floating-point representation
124
- issues can make your version be considered a different number (e.g. ``5.6 ``
125
- will be rounded as ``5.5999999999999996447286321199499070644378662109375 ``).
124
+ issues can make your version be considered a different number (e.g. ``5.7 ``
125
+ will be rounded as ``5.6999999999999996447286321199499070644378662109375 ``).
126
126
127
127
If you don't define this option and you haven't created your database
128
128
yet, you may get ``PDOException `` errors because Doctrine will try to
Original file line number Diff line number Diff line change @@ -1032,7 +1032,7 @@ need in your ``.env.test`` file:
1032
1032
.. code-block :: text
1033
1033
1034
1034
# .env.test
1035
- DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name_test"
1035
+ DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name_test?serverVersion=5.7 "
1036
1036
1037
1037
# use SQLITE
1038
1038
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
You can’t perform that action at this time.
0 commit comments