-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect charset + collation used when generating migrations #112
Comments
There is some non-documented configuration options available: In your config/doctrine.php return [
'managers' => [
'default' => [
'charset' => null,
'defaultTableOptions' => [
'charset' => null
],
// ... These configuration options are sent directly into doctrine. I guess the values could be pretty similiar to how they are defined in symfony. |
@eigan thanks a lot! This indeed did the trick. Would you like me to make a PR to add this to the documentation? Or would you rather keep it undocumented? |
Sure :) A PR for laravel-doctrine/orm (file in config/doctrine.php) and perhaps laravel-doctrine/docs. But I have no control over the laravel-doctrine.org site and cannot update it (sadly its very far behind at the moment). |
I've created a PR, so let's continue there |
When generating migrations, I expected it to honour the charset & collation settings for the Laravel DB connections. With newer versions of Laravel this is set to utf8mb4. However, when generating migrations, it seems to always default to
DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci`
.I tried looking for a way to tell Doctrine to use utf8mb4 and was looking for something like this where you set
default_table_options
, but couldn't find any nor am I certain this is the correct approach. Is this is a bug? A missing feature? How can I help resolve this?Finally, thanks a lot for all your hard work on this package. It saves all of us lots of time! Really appreciated.
The text was updated successfully, but these errors were encountered: