File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,31 @@ If there are any issues, correct them now before moving on.
164
164
Note that using the ACL is recommended when you have access to them
165
165
on your server because changing the umask is not thread-safe.
166
166
167
+ .. sidebar :: Setting Up The Database
168
+
169
+ One mistake even seasoned developers make when starting a Symfony2 project
170
+ is forgetting to setup default charset and collation on their database,
171
+ ending up with latin type collations, which are default for most databases.
172
+ They might even remember to do it the very first time, but forget that
173
+ it's all gone after running a relatively common command during development:
174
+
175
+ :: code-block: bash
176
+
177
+ app/console doctrine:database: drop --force
178
+ app/console doctrine:database: create
179
+
180
+ There's no way to configure these defaults inside doctrine, as it tries to be
181
+ as agnostic as possible in terms of enviroment configuration, so only way around it
182
+ is to configure server level defaults.
183
+
184
+ Setting UTF8 defaults for MySQL is as simple as adding a few lines to configuration file:
185
+
186
+ :: code-block: text
187
+
188
+ [mysqld]
189
+ collation-server = utf8_general_ci
190
+ character-set-server = utf8
191
+
167
192
When everything is fine, click on "Go to the Welcome page" to request your
168
193
first "real" Symfony2 webpage:
169
194
You can’t perform that action at this time.
0 commit comments